:root {
	--wd-hb-opt-h: 40px;
	--wd-text-font: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
	--wd-text-font-weight: 400;
	--wd-text-color: #767676;
	--wd-text-font-size: 14px;
	--wd-title-font: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
	--wd-title-font-weight: 400;
	--wd-title-color: #242424;
	--wd-entities-title-font: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
	--wd-entities-title-font-weight: 400;
	--wd-entities-title-color: #333333;
	--wd-entities-title-color-hover: rgb(51 51 51 / 65%);
	--wd-alternative-font: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
	--wd-widget-title-font: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
	--wd-widget-title-font-weight: 400;
	--wd-widget-title-transform: uppercase;
	--wd-widget-title-color: #333;
	--wd-widget-title-font-size: 16px;
	--wd-header-el-font: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
	--wd-header-el-font-weight: 400;
	--wd-header-el-transform: uppercase;
	--wd-header-el-font-size: 14px;
	--wd-otl-style: dotted;
	--wd-otl-width: 2px;
	--wd-primary-color: rgb(145,95,89);
	--wd-alternative-color: rgb(44,62,80);
	--btn-default-bgcolor: #f7f7f7;
	--btn-default-bgcolor-hover: #efefef;
	--btn-accented-bgcolor: rgb(145,95,89);
	--btn-accented-bgcolor-hover: rgb(122,77,72);
	--wd-form-brd-width: 2px;
	--notices-success-bg: #459647;
	--notices-success-color: #fff;
	--notices-warning-bg: #E0B252;
	--notices-warning-color: #fff;
	--wd-link-color: #333333;
	--wd-link-color-hover: #242424;
}
.wd-age-verify-wrap {
	--wd-popup-width: 500px;
}
.wd-popup.wd-promo-popup {
	background-color: #111111;
	background-image: url(https://strategy.tw/wp-content/uploads/2021/08/promo-popup.webp);
	background-repeat: no-repeat;
	background-size: cover;
	background-position: center center;
}
.wd-promo-popup-wrap {
	--wd-popup-width: 800px;
	--wd-popup-padding: 15px;
}
.wd-hb {
	background-color: rgb(145,95,89);
	background-image: none;
}
:is(.woodmart-woocommerce-layered-nav, .wd-product-category-filter) .wd-scroll-content {
	max-height: 223px;
}
.wd-page-title .wd-page-title-bg img {
	object-fit: cover;
	object-position: center center;
}
.wd-footer {
	background-color: #ffffff;
	background-image: none;
}
.wd .product-label.new {
	background-color: rgb(46,125,50);
}
.mfp-wrap.wd-popup-quick-view-wrap {
	--wd-popup-width: 920px;
}

@media (max-width: 1024px) {
	:root {
		--wd-hb-opt-h: 40px;
	}

}
:root{
--wd-container-w: 1222px;
--wd-form-brd-radius: 0px;
--btn-default-color: #333;
--btn-default-color-hover: #333;
--btn-accented-color: #fff;
--btn-accented-color-hover: #fff;
--btn-default-brd-radius: 5px;
--btn-default-box-shadow: none;
--btn-default-box-shadow-hover: none;
--btn-accented-brd-radius: 5px;
--btn-accented-box-shadow: none;
--btn-accented-box-shadow-hover: none;
--wd-brd-radius: 0px;
}

@media (min-width: 1222px) {
section.elementor-section.wd-section-stretch > .elementor-container {
margin-left: auto;
margin-right: auto;
}
}


.wd-page-title {
background-color: rgb(145,95,89);
}

/* =========================================================
   A2B 商品卡 + 文章精選圖片 + 國旗 終極完整修正版
   修正：解決文章與商品圖片高低不一，統一 3:4 比例 (涵蓋 WoodMart/Elementor)
   ========================================================= */

/* ---------------------------------------------------------
   1. 圖片外層容器：強制統一 3:4 比例 (包含商品與文章)
   --------------------------------------------------------- */
.product-grid-item .product-image-link,
.product-grid-item .product-element-top > a,
.woocommerce ul.products li.product .product-image-link,
.woocommerce ul.products li.product .product-element-top > a,
/* ── 文章/網誌精選圖片選擇器 (全面覆蓋 WoodMart & Elementor) ── */
.post-img-wrapp,
.post-img-wrapp > a,
.wd-post-thumb,
.wd-post-thumb > a,
.entry-thumbnail,
.entry-thumbnail > a,
.elementor-post__thumbnail,
.elementor-post__thumbnail__link,
.posts-loop .post-image-link {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    aspect-ratio: 3 / 4 !important; /* 強制 3:4 黃金比例 */
    overflow: hidden !important;
    border-radius: 16px !important;
    background: #f5f5f5 !important;
}

/* 圖片外層的相對定位繼承 */
.product-grid-item .product-element-top,
.woocommerce ul.products li.product .product-element-top,
.product-grid-item .wrap-product-loop,
.woocommerce ul.products li.product .product-wrapper,
.post-img-wrapp,
.wd-post-thumb,
.entry-thumbnail {
    position: relative !important;
}

/* 處理 HTML5 picture 標籤適應 */
.product-grid-item .product-image-link picture,
.product-grid-item .product-element-top > a picture,
.woocommerce ul.products li.product .product-image-link picture,
.woocommerce ul.products li.product .product-element-top > a picture,
.post-img-wrapp picture,
.wd-post-thumb picture,
.entry-thumbnail picture {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
}

/* ---------------------------------------------------------
   2. 圖片本體樣式：不拉伸、滿版裁剪、置中對齊 (排除國旗)
   --------------------------------------------------------- */
.product-grid-item .product-image-link img:not(.a2b-flag-badge img),
.product-grid-item .product-element-top > a img:not(.a2b-flag-badge img),
.woocommerce ul.products li.product .product-image-link img:not(.a2b-flag-badge img),
.woocommerce ul.products li.product .product-element-top > a img:not(.a2b-flag-badge img),
/* 文章精選圖片本體 */
.post-img-wrapp img,
.wd-post-thumb img,
.entry-thumbnail img,
.elementor-post__thumbnail img,
.posts-loop .post-image-link img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    max-height: none !important;
    object-fit: cover !important;        /* 滿版裁剪，絕不變形 */
    object-position: top center !important;  /* 以圖片上方為中心裁剪，防切頭 */
    border-radius: 16px !important;
}

/* ---------------------------------------------------------
   3. RWD 手機版圖片微調 (縮小圓角)
   --------------------------------------------------------- */
@media (max-width: 768px) {
    .product-grid-item .product-image-link,
    .product-grid-item .product-element-top > a,
    .woocommerce ul.products li.product .product-image-link,
    .woocommerce ul.products li.product .product-element-top > a,
    .post-img-wrapp,
    .wd-post-thumb,
    .entry-thumbnail,
    .elementor-post__thumbnail,
    .elementor-post__thumbnail__link {
        aspect-ratio: 3 / 4 !important;
        border-radius: 12px !important; /* 手機版圓角稍微縮小，視覺更精緻 */
    }

    .product-grid-item .product-image-link img:not(.a2b-flag-badge img),
    .product-grid-item .product-element-top > a img:not(.a2b-flag-badge img),
    .woocommerce ul.products li.product .product-image-link img:not(.a2b-flag-badge img),
    .woocommerce ul.products li.product .product-element-top > a img:not(.a2b-flag-badge img),
    .post-img-wrapp img,
    .wd-post-thumb img,
    .entry-thumbnail img,
    .elementor-post__thumbnail img {
        border-radius: 12px !important;
    }
}

/* ---------------------------------------------------------
   4. 手機版優化：限制篩選選單展開高度 & 終極消滅藍色按鈕
   --------------------------------------------------------- */
/* 終極消滅藍色按鈕 (所有可能發藍的屬性全覆蓋，強制改為桃紅色) */
html body .wpc-filters-section .wpc-filter-item.wpc-term-selected,
html body .wpc-filters-section .wpc-filter-item.wpc-term-selected > a,
html body .wpc-filters-section .wpc-filter-item.wpc-term-selected > label {
    background: #d81b60 !important;
    background-color: #d81b60 !important;
    border-color: #d81b60 !important;
    color: #ffffff !important;
    background-image: none !important; /* 殺死主題自帶的漸層背景 */
    box-shadow: none !important;       /* 殺死主題自帶的發光陰影 */
}

/* 手機版：強制限制選單展開的最大高度 */
@media (max-width: 767px) {
    body .wpc-filter-content {
        max-height: 120px !important;  /* 限制最高只能長到這裡，大約顯示 3 行按鈕 */
        overflow-y: auto !important;   /* 超過高度就變成內部上下滑動 */
        overflow-x: hidden !important;
        padding-right: 5px !important;  /* 留一點空間給滾動條 */
    }

    /* 手機版選單內部滾動條：改成可愛的粉紅色細線 */
    body .wpc-filter-content::-webkit-scrollbar {
        width: 4px !important;
    }
    body .wpc-filter-content::-webkit-scrollbar-track {
        background: #f1f1f1 !important; 
        border-radius: 4px !important;
    }
    body .wpc-filter-content::-webkit-scrollbar-thumb {
        background: #d81b60 !important; 
        border-radius: 4px !important;
    }
}

/* ---------------------------------------------------------
   5. 國旗樣式區 (左上角懸浮，完美填滿無白邊)
   --------------------------------------------------------- */
/* 國旗容器 */
.a2b-flag-badges {
    position: absolute !important;
    top: 10px !important;
    left: 10px !important;
    z-index: 99 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    pointer-events: none !important;
}

/* 單個國旗外框 */
.a2b-flag-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 42px !important;         /* 寬度設定 */
    height: 28px !important;        /* 高度設定 (3:2 常規國旗比例) */
    border-radius: 4px !important;  /* 稍微帶點圓角才不會太死板 */
    background: transparent !important; /* 移除白底 */
    box-shadow: 0 2px 6px rgba(0,0,0,0.25) !important; /* 保留懸浮陰影 */
    border: 1px solid rgba(0,0,0,0.1) !important;      /* 極細邊框防撞色 */
    overflow: hidden !important;    /* 讓內部圖片乖乖切出圓角 */
    box-sizing: border-box !important;
}

/* 國旗圖片本體 (直接設定 100% 填滿) */
.a2b-flag-badge img {
    display: block !important;
    width: 100% !important;  
    height: 100% !important; 
    min-width: 100% !important;
    min-height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 0 !important;    /* 交給外框裁切即可 */
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

/* 防止主圖規則誤傷國旗圖片 */
.a2b-flag-badges img,
.a2b-flag-badge img {
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 舊的文字 fallback 隱藏不顯示 */
.a2b-flag-text {
    display: none !important;
}

/* 1. 同時對商品外層與內部容器強制加上直角與粉色外框 */
.product.is-top-product,
.product.is-top-product .product-grid-item,
.product.is-top-product .content-product-impr {
    border: 3px solid #E06666 !important;
    border-radius: 0px !important;
    box-sizing: border-box !important;
}

.product.is-top-product {
    position: relative !important;
    overflow: hidden !important;
    padding: 8px !important;
    background-color: #ffffff !important;
}

/* 2. 徹底清除圖片與卡片的圓角 */
.product.is-top-product img,
.product.is-top-product .woodmart-product-image {
    border-radius: 0px !important;
}

/* 3. 確保 TOP 熱門標籤完美顯示 */
.product.is-top-product::after {
    content: "🔥 TOP 本月紅牌" !important;
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    background: linear-gradient(135deg, #E06666, #FF7777) !important;
    color: #ffffff !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    letter-spacing: 0.5px !important;
    padding: 4px 9px !important;
    z-index: 99 !important;
    border-radius: 0px !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2) !important;
}