/* 家百 M2-A 正式平台感(手機首頁+商店)。回滾:刪 bj-m2.css+bj-m2.php;首頁內容還原 option bj_m2_home_backup */

/* 平台導購 band */
.bj-platband{display:grid;grid-template-columns:repeat(5,1fr);background:#fff;border:1px solid #eae4da;border-radius:14px;padding:13px 2px;margin:14px 0 8px;box-shadow:0 1px 5px rgba(33,29,24,.05);}
.bj-platband a{display:flex;flex-direction:column;align-items:center;gap:6px;text-decoration:none;color:#4a463f;font-size:10.5px;letter-spacing:.01em;line-height:1.2;text-align:center;}
.bj-pb-ic{display:flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:50%;background:#f6f2ec;font-size:19px;}
.bj-platband a:last-child .bj-pb-ic{background:#fbecea;}
.bj-trustline{text-align:center;font-size:11.5px;color:#a39c90;letter-spacing:.05em;margin:0 0 4px;}
/* section heading */
.bj-sechead{display:flex;align-items:center;justify-content:space-between;margin:18px 2px 12px;}
.bj-sechead h2{margin:0;font-size:17px;font-weight:800;color:#211d18;letter-spacing:.03em;position:relative;padding-left:11px;}
.bj-sechead h2::before{content:"";position:absolute;left:0;top:52%;transform:translateY(-50%);width:4px;height:16px;background:#9e0b14;border-radius:2px;}
.bj-sechead a{font-size:12.5px;color:#a39c90;text-decoration:none;}

@media (max-width:768px){
  body{background:#f3efe9 !important;}
  /* app-bar header */
  .site-header{background:#fff !important;border-bottom:1px solid #eae4da !important;box-shadow:0 1px 3px rgba(0,0,0,.035) !important;}
  .site-header .menu-toggle,button.menu-toggle{background:#f3efe9 !important;border:0 !important;color:#211d18 !important;padding:9px 15px !important;border-radius:10px !important;font-size:13px !important;font-weight:600 !important;min-height:40px !important;letter-spacing:.05em !important;}
  .bj-v7 .bj-search-hero{padding-top:14px !important;}
  .bj-v7 .bj-bigsearch{box-shadow:0 6px 18px rgba(33,29,24,.07) !important;}

  /* 分類頻道 tiles */
  .bj-v7 .bj-rail{display:grid !important;grid-template-columns:repeat(5,1fr) !important;gap:4px !important;padding:4px 0 2px !important;background:none !important;border:0 !important;}
  .bj-v7 .bj-rail a{flex-direction:column !important;align-items:center !important;gap:6px !important;border:0 !important;background:none !important;padding:2px !important;color:#4a463f !important;font-size:11px !important;min-height:0 !important;}
  .bj-ch-ic{display:flex;align-items:center;justify-content:center;width:46px;height:46px;border-radius:15px;background:#fff;border:1px solid #eae4da;font-size:21px;box-shadow:0 2px 6px rgba(33,29,24,.045);}
  .bj-ch-tx{color:#4a463f;font-size:11px;}

  /* 貨架式商品卡(home+shop) */
  ul.products li.product{background:#fff !important;border:1px solid #eae4da !important;border-radius:12px !important;box-shadow:0 1px 4px rgba(33,29,24,.05) !important;overflow:hidden !important;padding-bottom:11px !important;margin:0 0 12px !important;}
  ul.products li.product img{border-radius:0 !important;margin:0 !important;}
  ul.products li.product .woocommerce-loop-product__title{font-size:13px !important;line-height:1.45 !important;color:#2b2823 !important;margin:9px 10px 5px !important;min-height:2.6em;font-weight:500 !important;}
  ul.products li.product .bj-loop-store{margin:0 6px 0 10px !important;font-size:10px !important;color:#7a756c !important;background:#f3efe9 !important;display:inline-block !important;padding:2px 7px !important;border-radius:5px !important;letter-spacing:0 !important;vertical-align:middle;}
  .bj-cat-tag{font-size:10px;color:#9e0b14;background:#fbecea;display:inline-block;padding:2px 7px;border-radius:5px;vertical-align:middle;}
  ul.products li.product .price{display:block !important;margin:8px 10px 0 !important;font-size:16px !important;color:#9e0b14 !important;font-weight:800 !important;letter-spacing:0 !important;}
  ul.products li.product .price .woocommerce-Price-currencySymbol{font-size:11px !important;font-weight:600 !important;margin-right:1px;}
  /* shop 加入購物車:精緻不裸 */
  .woocommerce ul.products li.product a.button.add_to_cart_button,.woocommerce ul.products li.product a.added_to_cart{display:block !important;margin:9px 10px 0 !important;width:auto !important;min-height:40px !important;font-size:13px !important;background:#9e0b14 !important;border-radius:8px !important;text-align:center !important;padding:12px 8px !important;line-height:1 !important;}
  /* 卡片去願望清單文字鏈 */
  ul.products li.product .tinv-wishlist,ul.products li.product .tinvwl-loop-button-wrapper,ul.products li.product [class*="tinvwl"]{display:none !important;}

  /* 商店頁:壓掉商品前大塊分頁 + 緊湊工具列 */
  .woocommerce-products-header{display:none !important;}
  .site-main > .woocommerce > .woocommerce-pagination:first-child,
  .woocommerce-page .site-main .woocommerce > .woocommerce-pagination:first-of-type{display:none !important;}
  .woocommerce-result-count{font-size:12px !important;color:#9a948a !important;margin:0 !important;line-height:42px !important;}
  .woocommerce-ordering{margin:0 !important;float:right !important;}
  .woocommerce-ordering select{min-height:40px !important;background:#fff !important;border:1px solid #eae4da !important;border-radius:8px !important;}
  .storefront-breadcrumb,.woocommerce-breadcrumb{font-size:11px !important;color:#b3ac9f !important;margin:0 0 8px !important;}
}

/* ===== M2-A2:只隱藏「商品前」頂部分頁,保留商品後/頁尾分頁 ===== */
@media (max-width:768px){
  main.site-main .storefront-sorting .woocommerce-pagination{display:none !important;}
  main.site-main ul.products ~ .storefront-sorting .woocommerce-pagination{display:block !important;}
  /* 頂部工具列維持緊湊:結果數左、排序右,單行 */
  main.site-main .storefront-sorting:first-of-type{display:flex !important;align-items:center !important;justify-content:space-between !important;flex-wrap:wrap !important;gap:8px !important;margin-bottom:10px !important;}
  main.site-main .storefront-sorting:first-of-type .woocommerce-result-count{line-height:1.4 !important;flex:1 1 auto;}
  main.site-main .storefront-sorting:first-of-type .woocommerce-ordering{float:none !important;flex:0 0 auto;}
}

/* ===== M2-B 買家流程正式化(商品頁/購物車/結帳/帳戶/通知)===== */
@media (max-width:768px){
  /* 通用:非商品頁的大標題縮小(帳戶/購物車/結帳/通知/一般頁)*/
  body:not(.single-product) .entry-title,
  body:not(.single-product) .page-title{font-size:21px !important;margin:6px 0 12px !important;font-weight:800 !important;letter-spacing:.02em !important;}

  /* ---- 商品頁 ---- */
  .single-product div.product .summary.entry-summary{background:#fff !important;border:1px solid #eae4da !important;border-radius:14px !important;padding:16px !important;box-shadow:0 1px 4px rgba(33,29,24,.05) !important;margin-top:8px !important;}
  .single-product .product_title,.single-product .summary h1{font-size:19px !important;line-height:1.45 !important;font-weight:700 !important;margin:0 0 8px !important;color:#211d18 !important;letter-spacing:.01em !important;}
  .single-product div.product .summary .price{font-size:22px !important;color:#9e0b14 !important;font-weight:800 !important;margin:0 0 6px !important;}
  .single-product .summary .price del{font-size:15px !important;color:#b3ac9f !important;font-weight:400 !important;}
  .single-product .summary .price ins{text-decoration:none !important;}
  .single-product .woocommerce-product-details__short-description{font-size:13.5px !important;color:#6f6a61 !important;line-height:1.7 !important;margin:6px 0 10px !important;}
  .single-product .stock{font-size:13px !important;font-weight:600 !important;}
  .bj-pdp-trust{display:flex;flex-wrap:wrap;gap:7px 14px;margin:10px 0 2px;padding:11px 0;border-top:1px solid #f1ece3;border-bottom:1px solid #f1ece3;font-size:12px;color:#6f6a61;}
  .bj-pdp-trust span{display:inline-flex;align-items:center;gap:4px;white-space:nowrap;}
  .single-product form.cart{display:flex !important;gap:8px !important;align-items:stretch !important;margin:14px 0 0 !important;}
  .single-product form.cart .quantity{flex:0 0 96px !important;}
  .single-product form.cart .quantity .qty{height:48px !important;width:100% !important;text-align:center !important;border-radius:8px !important;font-size:16px !important;}
  .single-product form.cart .single_add_to_cart_button{flex:1 1 auto !important;min-height:48px !important;font-size:15px !important;}
  /* 詢問賣家浮鈕 tame:小一點、次要,留在底部 nav 上方 */
  #bj-ask-float{bottom:80px !important;right:14px !important;padding:9px 14px !important;font-size:12.5px !important;font-weight:600 !important;letter-spacing:.03em !important;box-shadow:0 4px 14px rgba(120,10,10,.2) !important;opacity:.95 !important;}
  #bj-ask-float span{font-size:14px !important;}

  /* ---- 購物車(WC Blocks)---- */
  .wp-block-woocommerce-cart .wc-block-cart__submit-button,.wc-block-cart__submit-button,
  .woocommerce-cart .wc-proceed-to-checkout a.checkout-button{background:#9e0b14 !important;border-radius:10px !important;min-height:50px !important;font-size:15px !important;font-weight:700 !important;}
  .wc-block-cart__sidebar .wc-block-components-totals-wrapper,.cart_totals{background:#fff !important;border:1px solid #eae4da !important;border-radius:12px !important;padding:14px !important;}
  .wc-block-cart-items,.woocommerce-cart-form{background:#fff !important;border:1px solid #eae4da !important;border-radius:12px !important;padding:6px 12px !important;}
  .wc-block-components-product-name{font-weight:600 !important;}

  /* ---- 結帳(WC Blocks)---- */
  .wc-block-components-checkout-place-order-button,#place_order{background:#9e0b14 !important;border-radius:10px !important;min-height:52px !important;font-size:16px !important;font-weight:700 !important;}
  .wc-block-components-checkout-step__title,.wc-block-components-title{font-weight:800 !important;color:#211d18 !important;}
  .wc-block-checkout__sidebar .wc-block-components-totals-wrapper{background:#fff !important;border-radius:12px !important;}

  /* ---- 我的帳戶:panel 化 ---- */
  .woocommerce-account .u-column1,.woocommerce-account .u-column2,
  .woocommerce-account .col2-set .col-1,.woocommerce-account .col2-set .col-2{
    background:#fff !important;border:1px solid #eae4da !important;border-radius:14px !important;padding:18px 16px !important;margin:0 0 14px !important;box-shadow:0 1px 4px rgba(33,29,24,.05) !important;width:100% !important;float:none !important;
  }
  .woocommerce-account h2{font-size:16px !important;font-weight:800 !important;margin:0 0 14px !important;color:#211d18 !important;position:relative;padding-left:11px;}
  .woocommerce-account h2::before{content:"";position:absolute;left:0;top:52%;transform:translateY(-50%);width:4px;height:15px;background:#9e0b14;border-radius:2px;}
  .woocommerce-account label{font-size:13px !important;color:#6f6a61 !important;font-weight:500 !important;}
  .woocommerce-account .woocommerce-Button,.woocommerce-account button[type=submit],
  .woocommerce-form-login__submit,.woocommerce-form-register__submit{width:100% !important;min-height:48px !important;background:#9e0b14 !important;border-radius:10px !important;font-size:15px !important;}
  .woocommerce-account .woocommerce-form-login__rememberme{display:block;margin:4px 0 12px;font-size:13px;color:#6f6a61;}
  .woocommerce-account .lost_password{margin-top:12px !important;text-align:center;}
  .woocommerce-account .lost_password a{color:#9e0b14 !important;font-size:13px !important;}
  /* 已登入的帳戶導覽(M1 已膠囊化)留白 */
  .woocommerce-account .woocommerce-MyAccount-content{background:#fff !important;border:1px solid #eae4da !important;border-radius:14px !important;padding:16px !important;margin-top:10px !important;}

  /* ---- 通知中心 ---- */
  .bj-notifs{max-width:none !important;}
  .bj-notifs > p:first-child{background:#fff;border:1px solid #eae4da;border-radius:12px;padding:13px 15px;margin:0 0 12px;}
  .bj-notifs > p:first-child strong{color:#211d18;}
}

/* ===== M2-B 通知中心空狀態 ===== */
.bj-notif-empty{background:#fff;border:1px solid #eae4da;border-radius:14px;padding:36px 22px;text-align:center;box-shadow:0 1px 4px rgba(33,29,24,.05);margin-top:8px;max-width:560px;}
.bj-ne-ic{font-size:40px;margin-bottom:10px;opacity:.85;}
.bj-ne-t{font-size:16px;font-weight:700;color:#211d18;margin:0 0 6px;}
.bj-ne-s{font-size:13px;color:#9a948a;margin:0 0 18px;line-height:1.6;}
.bj-ne-btn{display:inline-block;background:#9e0b14;color:#fff;text-decoration:none;padding:11px 34px;border-radius:10px;font-weight:700;font-size:14px;}
.bj-ne-btn:hover{background:#7e070f;color:#fff;}

/* ===== M2-B 收尾 ===== */
@media (max-width:768px){
  .zoomImg{display:none !important;}
  /* 購物車賣家標籤的英文 Vendor: 隱藏(只留中文「賣家:」)*/
  .wc-block-components-product-metadata__description .wc-block-components-product-details{font-size:11px !important;color:#9a948a !important;}
}

/* ===== M2-B2:商品頁購買區不被詢問賣家浮鈕遮擋 ===== */
@media (max-width:768px){
  /* 移除 fixed 浮鈕(摘要區已有 inline 詢問賣家),不再 overlay 蓋購買操作 */
  body.single-product #bj-ask-float{display:none !important;}
  /* inline 詢問賣家 → 滿版次要 CTA,排在加入購物車/願望清單下方,分層不覆蓋 */
  .single-product .bj-ask-wrap{margin:12px 0 0 !important;clear:both !important;padding:0 !important;}
  .single-product .bj-askbtn{display:block !important;width:100% !important;box-sizing:border-box !important;text-align:center !important;min-height:46px !important;line-height:1.2 !important;padding:13px 14px !important;background:#fff !important;color:#9e0b14 !important;border:1.5px solid #9e0b14 !important;border-radius:10px !important;font-size:14px !important;font-weight:700 !important;text-decoration:none !important;letter-spacing:.03em !important;}
  .single-product .bj-askbtn:hover{background:#fbecea !important;color:#9e0b14 !important;}
  /* 主 CTA 加入購物車:正式平台主按鈕 */
  .single-product form.cart .single_add_to_cart_button{background:#9e0b14 !important;font-weight:800 !important;box-shadow:0 4px 12px rgba(158,11,20,.18) !important;letter-spacing:.04em !important;}
}

/* ===== M2-B3:商品頁購買列不被底部 nav 遮、主 CTA 單行完整 ===== */
@media (max-width:768px){
  /* 商品頁購買 CTA 優先 → 隱藏底部固定 nav(避免蓋住加入購物車/願望清單) */
  body.single-product .storefront-handheld-footer-bar{display:none !important;}
  body.single-product{padding-bottom:18px !important;}
  /* 購買列正式 3 欄:qty / 加入購物車(flex,單行) / 願望清單(icon) */
  .single-product form.cart{display:flex !important;align-items:stretch !important;gap:8px !important;flex-wrap:nowrap !important;margin:14px 0 0 !important;}
  .single-product form.cart .quantity{flex:0 0 92px !important;margin:0 !important;}
  .single-product form.cart .quantity .qty{height:54px !important;width:100% !important;box-sizing:border-box !important;text-align:center !important;font-size:16px !important;border-radius:8px !important;}
  .single-product form.cart .single_add_to_cart_button{flex:1 1 0 !important;min-width:0 !important;width:auto !important;max-width:none !important;white-space:nowrap !important;height:54px !important;min-height:54px !important;line-height:1 !important;font-size:16px !important;font-weight:800 !important;padding:0 14px !important;display:flex !important;align-items:center !important;justify-content:center !important;border-radius:10px !important;background:#9e0b14 !important;box-shadow:0 4px 12px rgba(158,11,20,.18) !important;}
  .single-product form.cart .tinv-wraper,.single-product form.cart .tinv-wishlist{flex:0 0 44px !important;margin:0 !important;}
  .single-product form.cart .tinv-wraper a,.single-product form.cart .tinvwl_add_to_wishlist_button,.single-product form.cart .tinv-wishlist a{width:44px !important;height:54px !important;display:flex !important;align-items:center !important;justify-content:center !important;}
}

/* ===== M2-B3b:願望清單換到購買列下方獨立一行(避免 44px 直書擠壓)===== */
@media (max-width:768px){
  .single-product form.cart{flex-wrap:wrap !important;}
  /* qty + 加入購物車 留在第一列;願望清單整列換行到下方 */
  .single-product form.cart .quantity{order:1 !important;}
  .single-product form.cart .single_add_to_cart_button{order:2 !important;}
  .single-product form.cart .tinv-wraper,.single-product form.cart .tinv-wishlist{flex:0 0 100% !important;width:100% !important;order:3 !important;margin:8px 0 0 !important;}
  .single-product form.cart .tinv-wraper a,.single-product form.cart .tinv-wishlist a,.single-product form.cart .tinvwl_add_to_wishlist_button{
    width:100% !important;height:46px !important;display:flex !important;align-items:center !important;justify-content:center !important;gap:6px !important;
    border:1px solid #eae4da !important;border-radius:10px !important;background:#fff !important;color:#6f6a61 !important;font-size:13.5px !important;white-space:nowrap !important;text-decoration:none !important;
  }
}
