/*
 * WooCommerce 产品分类归档、商店归档、产品标签归档：列表/子类目/工具条（与首页白底卡片体系统一）。
 * 画布：与 Porto #main 一致 #f4f4f4；顶栏与内容区偏白，避免此前灰蓝渐变与首页割裂。
 * 依赖 buildbarn-ai-visibility-site-ui.css 中的 --bb-* 变量。
 *
 * 作用域：body.tax-product_cat | body.tax-product_tag | body.post-type-archive-product（商店）
 */

html body.woocommerce.tax-product_cat #main,
html body.woocommerce.tax-product_tag #main,
html body.woocommerce.post-type-archive-product #main {
	background: var(--bb-bg-page, #f3efe6) !important;
}

html body.woocommerce.tax-product_cat .page-top,
html body.woocommerce.tax-product_tag .page-top,
html body.woocommerce.post-type-archive-product .page-top {
	background: var(--bb-bg-card, #ffffff) !important;
	border-bottom: 1px solid rgba(122, 91, 63, 0.08) !important;
	box-shadow: none !important;
	padding-top: clamp(0.85rem, 2vw, 1.15rem) !important;
	padding-bottom: clamp(0.85rem, 2vw, 1.15rem) !important;
}

html body.woocommerce.tax-product_cat .page-top .page-title,
html body.woocommerce.tax-product_tag .page-top .page-title,
html body.woocommerce.post-type-archive-product .page-top .page-title {
	font-size: clamp(1.15rem, 2.2vw, 1.45rem) !important;
	font-weight: 600 !important;
	letter-spacing: -0.03em !important;
	color: var(--bb-text-primary, #241f1a) !important;
}

html body.woocommerce.tax-product_cat .page-top .breadcrumbs-wrap,
html body.woocommerce.tax-product_tag .page-top .breadcrumbs-wrap,
html body.woocommerce.post-type-archive-product .page-top .breadcrumbs-wrap {
	font-size: 0.8125rem !important;
}

/* 主栏 / 侧栏：白底，与首页卡片在同一「浅灰画布 + 白面」层次 */
html body.woocommerce.tax-product_cat #main .main-content,
html body.woocommerce.tax-product_tag #main .main-content,
html body.woocommerce.post-type-archive-product #main .main-content {
	background: var(--bb-bg-card, #ffffff) !important;
}

html body.woocommerce.tax-product_cat #main .sidebar,
html body.woocommerce.tax-product_tag #main .sidebar,
html body.woocommerce.post-type-archive-product #main .sidebar {
	background: var(--bb-bg-card, #ffffff) !important;
}

@media (min-width: 992px) {
	html body.woocommerce.tax-product_cat #main .main-content,
	html body.woocommerce.tax-product_tag #main .main-content,
	html body.woocommerce.post-type-archive-product #main .main-content {
		border-radius: 22px !important;
		border: 1px solid rgba(122, 91, 63, 0.08) !important;
		box-shadow:
			0 2px 4px rgba(95, 70, 50, 0.04),
			0 18px 48px rgba(95, 70, 50, 0.06) !important;
	}

	html body.woocommerce.tax-product_cat #main .sidebar,
	html body.woocommerce.tax-product_tag #main .sidebar,
	html body.woocommerce.post-type-archive-product #main .sidebar {
		border-radius: 22px !important;
		border: 1px solid rgba(122, 91, 63, 0.08) !important;
		box-shadow:
			0 2px 4px rgba(95, 70, 50, 0.04),
			0 18px 48px rgba(95, 70, 50, 0.06) !important;
	}
}

@media (min-width: 1200px) {
	html.sidebar-open body.tax-product_cat #main .sidebar.porto-woo-category-sidebar,
	html.sidebar-open body.tax-product_tag #main .sidebar.porto-woo-category-sidebar,
	html.sidebar-open body.post-type-archive-product #main .sidebar.porto-woo-category-sidebar,
	html.porto-open-sidebar body.tax-product_cat #main .sidebar.porto-woo-category-sidebar,
	html.porto-open-sidebar body.tax-product_tag #main .sidebar.porto-woo-category-sidebar,
	html.porto-open-sidebar body.post-type-archive-product #main .sidebar.porto-woo-category-sidebar,
	body.sidebar-open.tax-product_cat #main .sidebar.porto-woo-category-sidebar,
	body.sidebar-open.tax-product_tag #main .sidebar.porto-woo-category-sidebar,
	body.sidebar-open.post-type-archive-product #main .sidebar.porto-woo-category-sidebar,
	body.porto-open-sidebar.tax-product_cat #main .sidebar.porto-woo-category-sidebar,
	body.porto-open-sidebar.tax-product_tag #main .sidebar.porto-woo-category-sidebar,
	body.porto-open-sidebar.post-type-archive-product #main .sidebar.porto-woo-category-sidebar {
		position: static !important;
		left: auto !important;
		right: auto !important;
		transform: none !important;
	}

	/* Catalog desktop/tablet: disable hidden-drawer trigger mode entirely. */
	html body.tax-product_cat #header a[aria-label='Mobile Menu'],
	html body.tax-product_tag #header a[aria-label='Mobile Menu'],
	html body.post-type-archive-product #header a[aria-label='Mobile Menu'],
	html body.tax-product_cat #header .mobile-toggle,
	html body.tax-product_tag #header .mobile-toggle,
	html body.post-type-archive-product #header .mobile-toggle {
		display: none !important;
	}

	html body.tax-product_cat #bb-mob-overlay,
	html body.tax-product_tag #bb-mob-overlay,
	html body.post-type-archive-product #bb-mob-overlay,
	html body.tax-product_cat #bb-mob-drawer,
	html body.tax-product_tag #bb-mob-drawer,
	html body.post-type-archive-product #bb-mob-drawer {
		display: none !important;
	}

	html body.tax-product_cat #main .sidebar-menu-toggle,
	html body.tax-product_tag #main .sidebar-menu-toggle,
	html body.post-type-archive-product #main .sidebar-menu-toggle,
	html body.tax-product_cat #main .sidebar-toggle,
	html body.tax-product_tag #main .sidebar-toggle,
	html body.post-type-archive-product #main .sidebar-toggle,
	html body.tax-product_cat #main .shop-sidebar-toggle,
	html body.tax-product_tag #main .shop-sidebar-toggle,
	html body.post-type-archive-product #main .shop-sidebar-toggle,
	html body.tax-product_cat #main .filter-toggle,
	html body.tax-product_tag #main .filter-toggle,
	html body.post-type-archive-product #main .filter-toggle,
	html body.tax-product_cat #main .mobile-sidebar-toggle,
	html body.tax-product_tag #main .mobile-sidebar-toggle,
	html body.post-type-archive-product #main .mobile-sidebar-toggle {
		display: none !important;
		visibility: hidden !important;
		opacity: 0 !important;
	}

	/*
	 * Keep catalog left sidebar from being squeezed by theme/builder row sizing.
	 * Lock sidebar to a slightly wider fixed basis and prevent flex shrinking.
	 */
	html body.woocommerce.tax-product_cat #header a[aria-label='Mobile Menu'],
	html body.woocommerce.tax-product_tag #header a[aria-label='Mobile Menu'],
	html body.woocommerce.post-type-archive-product #header a[aria-label='Mobile Menu'],
	html body.woocommerce.tax-product_cat #header .mobile-toggle,
	html body.woocommerce.tax-product_tag #header .mobile-toggle,
	html body.woocommerce.post-type-archive-product #header .mobile-toggle {
		display: none !important;
	}

	html body.woocommerce.tax-product_cat #main .row.main-content-wrap > .sidebar,
	html body.woocommerce.tax-product_tag #main .row.main-content-wrap > .sidebar,
	html body.woocommerce.post-type-archive-product #main .row.main-content-wrap > .sidebar {
		display: block !important;
		position: static !important;
		top: auto !important;
		align-self: flex-start !important;
		visibility: visible !important;
		opacity: 1 !important;
		transform: none !important;
	}

	html body.tax-product_cat #main .sidebar.porto-woo-category-sidebar,
	html body.tax-product_tag #main .sidebar.porto-woo-category-sidebar,
	html body.post-type-archive-product #main .sidebar.porto-woo-category-sidebar {
		display: block !important;
		position: static !important;
		visibility: visible !important;
		opacity: 1 !important;
		left: auto !important;
		right: auto !important;
		transform: none !important;
		margin-left: 0 !important;
	}

	html body.woocommerce.tax-product_cat #main .row.main-content-wrap > .col-lg-3.sidebar.porto-woo-category-sidebar,
	html body.woocommerce.tax-product_tag #main .row.main-content-wrap > .col-lg-3.sidebar.porto-woo-category-sidebar,
	html body.woocommerce.post-type-archive-product #main .row.main-content-wrap > .col-lg-3.sidebar.porto-woo-category-sidebar {
		display: block !important;
		float: left !important;
		width: 320px !important;
		max-width: none !important;
		min-width: 320px !important;
	}

	html body.woocommerce.tax-product_cat #main .row.main-content-wrap > .col-lg-9.main-content,
	html body.woocommerce.tax-product_tag #main .row.main-content-wrap > .col-lg-9.main-content,
	html body.woocommerce.post-type-archive-product #main .row.main-content-wrap > .col-lg-9.main-content {
		float: left !important;
		width: calc(100% - 320px) !important;
		max-width: none !important;
		min-width: 0 !important;
	}

	/* Porto sticky plugin may inject runtime inline width (around 190px). */
	html body.woocommerce.tax-product_cat #main .row.main-content-wrap > .sidebar .sticky-wrapper,
	html body.woocommerce.tax-product_tag #main .row.main-content-wrap > .sidebar .sticky-wrapper,
	html body.woocommerce.post-type-archive-product #main .row.main-content-wrap > .sidebar .sticky-wrapper {
		width: 100% !important;
		max-width: none !important;
		min-width: 0 !important;
	}

	html body.woocommerce.tax-product_cat #main .row.main-content-wrap > .sidebar > [data-plugin-sticky],
	html body.woocommerce.tax-product_tag #main .row.main-content-wrap > .sidebar > [data-plugin-sticky],
	html body.woocommerce.post-type-archive-product #main .row.main-content-wrap > .sidebar > [data-plugin-sticky] {
		position: static !important;
		top: auto !important;
		left: auto !important;
		right: auto !important;
		transform: none !important;
		width: 100% !important;
		max-width: none !important;
		min-width: 0 !important;
	}

	html body.woocommerce.tax-product_cat #main .row.main-content-wrap > .sidebar .sidebar-content,
	html body.woocommerce.tax-product_tag #main .row.main-content-wrap > .sidebar .sidebar-content,
	html body.woocommerce.post-type-archive-product #main .row.main-content-wrap > .sidebar .sidebar-content,
	html body.woocommerce.tax-product_cat #main .row.main-content-wrap > .sidebar .sidebar-content > .widget,
	html body.woocommerce.tax-product_tag #main .row.main-content-wrap > .sidebar .sidebar-content > .widget,
	html body.woocommerce.post-type-archive-product #main .row.main-content-wrap > .sidebar .sidebar-content > .widget {
		width: 100% !important;
		max-width: none !important;
	}

	html body.woocommerce.tax-product_cat #main .row.main-content-wrap > .sidebar .sidebar-content,
	html body.woocommerce.tax-product_tag #main .row.main-content-wrap > .sidebar .sidebar-content,
	html body.woocommerce.post-type-archive-product #main .row.main-content-wrap > .sidebar .sidebar-content,
	html body.woocommerce.tax-product_cat #main .row.main-content-wrap > .sidebar .bb-rebuilt-cat-sidebar__panel,
	html body.woocommerce.tax-product_tag #main .row.main-content-wrap > .sidebar .bb-rebuilt-cat-sidebar__panel,
	html body.woocommerce.post-type-archive-product #main .row.main-content-wrap > .sidebar .bb-rebuilt-cat-sidebar__panel {
		position: static !important;
		top: auto !important;
	}
}

@media (min-width: 768px) {
	/* 避免祖先 transform 导致 position:fixed 相对错误容器 */
	html body.woocommerce.tax-product_cat #main,
	html body.woocommerce.tax-product_tag #main,
	html body.woocommerce.post-type-archive-product #main {
		transform: none !important;
		filter: none !important;
		perspective: none !important;
	}

	html body.woocommerce.tax-product_cat #main .row.main-content-wrap,
	html body.woocommerce.tax-product_tag #main .row.main-content-wrap,
	html body.woocommerce.post-type-archive-product #main .row.main-content-wrap {
		display: flex !important;
		flex-wrap: nowrap !important;
		align-items: flex-start !important;
	}

	html body.woocommerce.tax-product_cat #main .row.main-content-wrap > .sidebar,
	html body.woocommerce.tax-product_tag #main .row.main-content-wrap > .sidebar,
	html body.woocommerce.post-type-archive-product #main .row.main-content-wrap > .sidebar {
		float: none !important;
		flex: 0 0 320px !important;
		width: 320px !important;
		max-width: 320px !important;
		min-width: 320px !important;
		position: relative !important;
		top: auto !important;
		left: auto !important;
		right: auto !important;
		transform: none !important;
		align-self: flex-start !important;
		overflow: visible !important;
	}

	html body.woocommerce.tax-product_cat #main .row.main-content-wrap > .sidebar.mobile-sidebar,
	html body.woocommerce.tax-product_tag #main .row.main-content-wrap > .sidebar.mobile-sidebar,
	html body.woocommerce.post-type-archive-product #main .row.main-content-wrap > .sidebar.mobile-sidebar {
		position: static !important;
		top: auto !important;
		left: auto !important;
		right: auto !important;
		bottom: auto !important;
		transform: none !important;
		height: auto !important;
	}

	html body.woocommerce.tax-product_cat #main .row.main-content-wrap > .main-content,
	html body.woocommerce.tax-product_tag #main .row.main-content-wrap > .main-content,
	html body.woocommerce.post-type-archive-product #main .row.main-content-wrap > .main-content {
		float: none !important;
		flex: 1 1 auto !important;
		width: auto !important;
		max-width: none !important;
		min-width: 0 !important;
	}

	html body.woocommerce.tax-product_cat #main .row.main-content-wrap > .sidebar > [data-plugin-sticky],
	html body.woocommerce.tax-product_tag #main .row.main-content-wrap > .sidebar > [data-plugin-sticky],
	html body.woocommerce.post-type-archive-product #main .row.main-content-wrap > .sidebar > [data-plugin-sticky],
	html body.woocommerce.tax-product_cat #main .row.main-content-wrap > .sidebar .sticky-wrapper,
	html body.woocommerce.tax-product_tag #main .row.main-content-wrap > .sidebar .sticky-wrapper,
	html body.woocommerce.post-type-archive-product #main .row.main-content-wrap > .sidebar .sticky-wrapper {
		position: static !important;
		top: auto !important;
		bottom: auto !important;
		left: auto !important;
		right: auto !important;
		transform: none !important;
	}

	html body.woocommerce.tax-product_cat #main .row.main-content-wrap > .sidebar .sidebar-content,
	html body.woocommerce.tax-product_tag #main .row.main-content-wrap > .sidebar .sidebar-content,
	html body.woocommerce.post-type-archive-product #main .row.main-content-wrap > .sidebar .sidebar-content,
	html body.woocommerce.tax-product_cat #main .row.main-content-wrap > .sidebar .bb-rebuilt-cat-sidebar__panel,
	html body.woocommerce.tax-product_tag #main .row.main-content-wrap > .sidebar .bb-rebuilt-cat-sidebar__panel,
	html body.woocommerce.post-type-archive-product #main .row.main-content-wrap > .sidebar .bb-rebuilt-cat-sidebar__panel {
		position: static !important;
		left: auto !important;
		top: auto !important;
		bottom: auto !important;
		transform: none !important;
		width: 320px !important;
		max-width: 320px !important;
		max-height: none !important;
		overflow-y: visible !important;
		overflow-x: hidden !important;
		padding: 14px 12px !important;
		margin-top: 0 !important;
		z-index: 20 !important;
		box-sizing: border-box !important;
		background: var(--bb-bg-card, #ffffff) !important;
		border-radius: 18px !important;
		border: 1px solid rgba(122, 91, 63, 0.1) !important;
		box-shadow: 0 8px 28px rgba(95, 70, 50, 0.08) !important;
	}

	html body.woocommerce.tax-product_cat #main .row.main-content-wrap > .sidebar .bb-rebuilt-cat-sidebar__panel,
	html body.woocommerce.tax-product_tag #main .row.main-content-wrap > .sidebar .bb-rebuilt-cat-sidebar__panel,
	html body.woocommerce.post-type-archive-product #main .row.main-content-wrap > .sidebar .bb-rebuilt-cat-sidebar__panel {
		margin-top: 0 !important;
	}
}

/* 类目说明（若有） */
html body.woocommerce.tax-product_cat .term-description,
html body.woocommerce.tax-product_tag .term-description,
html body.woocommerce.post-type-archive-product .term-description {
	margin-bottom: 1.25rem !important;
	padding: 1rem 1.15rem !important;
	border-radius: 16px !important;
	border: 1px solid rgba(122, 91, 63, 0.08) !important;
	background: linear-gradient(180deg, #ffffff 0%, #fafaf9 100%) !important;
	box-shadow:
		0 2px 4px rgba(95, 70, 50, 0.04),
		0 12px 32px rgba(95, 70, 50, 0.06) !important;
	color: var(--bb-text-secondary, #6c5645) !important;
	font-size: 0.9375rem !important;
	line-height: 1.65 !important;
}

/* 排序/结果数工具条 */
html body.woocommerce.tax-product_cat .woocommerce-result-count,
html body.woocommerce.tax-product_tag .woocommerce-result-count,
html body.woocommerce.post-type-archive-product .woocommerce-result-count {
	font-size: 0.8125rem !important;
	font-weight: 500 !important;
	color: var(--bb-text-secondary, #6c5645) !important;
	letter-spacing: 0.02em !important;
}

html body.woocommerce.tax-product_cat form.woocommerce-ordering,
html body.woocommerce.tax-product_tag form.woocommerce-ordering,
html body.woocommerce.post-type-archive-product form.woocommerce-ordering {
	margin: 0 !important;
}

html body.woocommerce.tax-product_cat form.woocommerce-ordering select,
html body.woocommerce.tax-product_tag form.woocommerce-ordering select,
html body.woocommerce.post-type-archive-product form.woocommerce-ordering select {
	border-radius: 10px !important;
	border: 1px solid rgba(122, 91, 63, 0.12) !important;
	background: var(--bb-bg-card, #ffffff) !important;
	font-size: 0.8125rem !important;
	font-weight: 500 !important;
	padding: 0.45rem 2rem 0.45rem 0.75rem !important;
	color: var(--bb-text-primary, #241f1a) !important;
	box-shadow: 0 1px 2px rgba(95, 70, 50, 0.04) !important;
}

/*
 * 子类目磁贴（与产品同 ul.products 时）
 */
html body.woocommerce.tax-product_cat ul.products li.product-category .product-inner,
html body.woocommerce.tax-product_tag ul.products li.product-category .product-inner,
html body.woocommerce.post-type-archive-product ul.products li.product-category .product-inner {
	background: linear-gradient(180deg, #ffffff 0%, #fafaf9 100%) !important;
	border: 1px solid rgba(122, 91, 63, 0.08) !important;
	border-radius: 18px !important;
	box-shadow:
		0 2px 4px rgba(95, 70, 50, 0.04),
		0 14px 40px rgba(95, 70, 50, 0.07) !important;
	overflow: hidden !important;
	transition:
		transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
		box-shadow 0.45s ease,
		border-color 0.3s ease !important;
}

html body.woocommerce.tax-product_cat ul.products li.product-category:hover .product-inner,
html body.woocommerce.tax-product_tag ul.products li.product-category:hover .product-inner,
html body.woocommerce.post-type-archive-product ul.products li.product-category:hover .product-inner {
	transform: translateY(-4px) !important;
	border-color: rgba(122, 91, 63, 0.14) !important;
	box-shadow:
		0 8px 16px rgba(95, 70, 50, 0.06),
		0 26px 52px rgba(95, 70, 50, 0.11) !important;
}

html body.woocommerce.tax-product_cat ul.products li.product-category .thumb-info,
html body.woocommerce.tax-product_tag ul.products li.product-category .thumb-info,
html body.woocommerce.post-type-archive-product ul.products li.product-category .thumb-info {
	border-radius: 18px !important;
	overflow: hidden !important;
}

html body.woocommerce.tax-product_cat ul.products li.product-category .woocommerce-loop-category__title,
html body.woocommerce.tax-product_tag ul.products li.product-category .woocommerce-loop-category__title,
html body.woocommerce.post-type-archive-product ul.products li.product-category .woocommerce-loop-category__title {
	font-size: clamp(0.95rem, 1.5vw, 1.05rem) !important;
	font-weight: 600 !important;
	letter-spacing: -0.02em !important;
	padding: 0.65rem 0.5rem 0.85rem !important;
}

html body.woocommerce.tax-product_cat ul.products li.product-category mark.count,
html body.woocommerce.tax-product_tag ul.products li.product-category mark.count,
html body.woocommerce.post-type-archive-product ul.products li.product-category mark.count {
	background: rgba(122, 91, 63, 0.06) !important;
	color: var(--bb-text-secondary, #6e6e6e) !important;
	font-size: 0.6875rem !important;
	font-weight: 600 !important;
	letter-spacing: 0.12em !important;
	text-transform: uppercase !important;
	border-radius: 999px !important;
	padding: 0.2rem 0.55rem !important;
}

/*
 * 产品卡（覆盖 site-ui 里过大的 .post-title 字号）
 */
html body.woocommerce.tax-product_cat ul.products li.product:not(.product-category) .product-inner,
html body.woocommerce.tax-product_tag ul.products li.product:not(.product-category) .product-inner,
html body.woocommerce.post-type-archive-product ul.products li.product:not(.product-category) .product-inner {
	background: linear-gradient(180deg, #ffffff 0%, #fafaf9 100%) !important;
	border: 1px solid rgba(122, 91, 63, 0.08) !important;
	border-radius: 18px !important;
	box-shadow:
		0 2px 4px rgba(95, 70, 50, 0.04),
		0 14px 40px rgba(95, 70, 50, 0.07) !important;
	overflow: hidden !important;
	transition:
		transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
		box-shadow 0.45s ease,
		border-color 0.3s ease !important;
}

html body.woocommerce.tax-product_cat ul.products li.product:not(.product-category):hover .product-inner,
html body.woocommerce.tax-product_tag ul.products li.product:not(.product-category):hover .product-inner,
html body.woocommerce.post-type-archive-product ul.products li.product:not(.product-category):hover .product-inner {
	transform: translateY(-5px) !important;
	border-color: rgba(122, 91, 63, 0.14) !important;
	box-shadow:
		0 8px 16px rgba(95, 70, 50, 0.06),
		0 26px 52px rgba(95, 70, 50, 0.11) !important;
}

html body.woocommerce.tax-product_cat ul.products li.product .woocommerce-loop-product__title,
html body.woocommerce.tax-product_tag ul.products li.product .woocommerce-loop-product__title,
html body.woocommerce.post-type-archive-product ul.products li.product .woocommerce-loop-product__title,
html body.woocommerce.tax-product_cat ul.products li.product .post-title,
html body.woocommerce.tax-product_tag ul.products li.product .post-title,
html body.woocommerce.post-type-archive-product ul.products li.product .post-title {
	font-size: clamp(0.95rem, 1.35vw, 1.05rem) !important;
	font-weight: 600 !important;
	line-height: 1.35 !important;
	letter-spacing: -0.02em !important;
}

html body.woocommerce.tax-product_cat ul.products li.product .post-title a,
html body.woocommerce.tax-product_tag ul.products li.product .post-title a,
html body.woocommerce.post-type-archive-product ul.products li.product .post-title a {
	color: var(--bb-text-primary, #241f1a) !important;
}

html body.woocommerce.tax-product_cat ul.products li.product .price,
html body.woocommerce.tax-product_tag ul.products li.product .price,
html body.woocommerce.post-type-archive-product ul.products li.product .price {
	font-weight: 600 !important;
	font-size: 0.9375rem !important;
}

html body.woocommerce.tax-product_cat ul.products li.product .product-image,
html body.woocommerce.tax-product_tag ul.products li.product .product-image,
html body.woocommerce.post-type-archive-product ul.products li.product .product-image {
	border-radius: 18px 18px 0 0 !important;
	overflow: hidden !important;
}

/* Porto 按钮 */
html body.woocommerce.tax-product_cat ul.products li.product a.button,
html body.woocommerce.tax-product_tag ul.products li.product a.button,
html body.woocommerce.post-type-archive-product ul.products li.product a.button,
html body.woocommerce.tax-product_cat ul.products li.product .add_to_cart_button,
html body.woocommerce.tax-product_tag ul.products li.product .add_to_cart_button,
html body.woocommerce.post-type-archive-product ul.products li.product .add_to_cart_button {
	border-radius: 10px !important;
	font-weight: 600 !important;
	font-size: 0.8125rem !important;
}

/* 分页 */
html body.woocommerce.tax-product_cat nav.woocommerce-pagination ul,
html body.woocommerce.tax-product_tag nav.woocommerce-pagination ul,
html body.woocommerce.post-type-archive-product nav.woocommerce-pagination ul {
	gap: 0.35rem !important;
}

html body.woocommerce.tax-product_cat nav.woocommerce-pagination ul li a,
html body.woocommerce.tax-product_cat nav.woocommerce-pagination ul li span,
html body.woocommerce.tax-product_tag nav.woocommerce-pagination ul li a,
html body.woocommerce.tax-product_tag nav.woocommerce-pagination ul li span,
html body.woocommerce.post-type-archive-product nav.woocommerce-pagination ul li a,
html body.woocommerce.post-type-archive-product nav.woocommerce-pagination ul li span {
	border-radius: 10px !important;
	border: 1px solid rgba(122, 91, 63, 0.1) !important;
	background: var(--bb-bg-card, #ffffff) !important;
	min-width: 2.5rem !important;
	text-align: center !important;
	font-weight: 600 !important;
	font-size: 0.8125rem !important;
}

html body.woocommerce.tax-product_cat nav.woocommerce-pagination ul li span.current,
html body.woocommerce.tax-product_tag nav.woocommerce-pagination ul li span.current,
html body.woocommerce.post-type-archive-product nav.woocommerce-pagination ul li span.current {
	background: var(--bb-brand-primary, #7a5b3f) !important;
	color: #ffffff !important;
	border-color: var(--bb-brand-primary, #7a5b3f) !important;
}

/* 列表栅格间距 */
html body.woocommerce.tax-product_cat ul.products.products-container,
html body.woocommerce.tax-product_tag ul.products.products-container,
html body.woocommerce.post-type-archive-product ul.products.products-container {
	gap: 1.1rem 1.25rem !important;
}

@media (max-width: 767px) {
	html body.woocommerce.tax-product_cat ul.products.products-container,
	html body.woocommerce.tax-product_tag ul.products.products-container,
	html body.woocommerce.post-type-archive-product ul.products.products-container {
		gap: 0.85rem !important;
	}
}

/* Porto Template Builder 归档列表（若主题为 archive-products + porto-tb-item） */
html body.woocommerce.tax-product_cat .archive-products .porto-tb-item.product,
html body.woocommerce.tax-product_tag .archive-products .porto-tb-item.product,
html body.woocommerce.post-type-archive-product .archive-products .porto-tb-item.product {
	border-radius: 18px !important;
	border: 1px solid rgba(122, 91, 63, 0.08) !important;
	box-shadow:
		0 2px 4px rgba(95, 70, 50, 0.04),
		0 14px 40px rgba(95, 70, 50, 0.07) !important;
}

html body.woocommerce.tax-product_cat .archive-products .porto-tb-item.product .post-title,
html body.woocommerce.tax-product_tag .archive-products .porto-tb-item.product .post-title,
html body.woocommerce.post-type-archive-product .archive-products .porto-tb-item.product .post-title {
	font-size: clamp(0.95rem, 1.35vw, 1.05rem) !important;
	font-weight: 600 !important;
	line-height: 1.35 !important;
}

/* Phase: full-site high-end redesign (PLP skeleton). */
html body.woocommerce.tax-product_cat #main,
html body.woocommerce.tax-product_tag #main,
html body.woocommerce.post-type-archive-product #main {
	background: var(--bb-bg-page, #f3efe6) !important;
}

html body.woocommerce.tax-product_cat .products-before,
html body.woocommerce.tax-product_tag .products-before,
html body.woocommerce.post-type-archive-product .products-before {
	border: 1px solid var(--bb-border-soft, #d9d6d2) !important;
	border-radius: var(--bb-radius-lg, 18px) !important;
	background: var(--bb-bg-card, #ffffff) !important;
	padding: 0.6rem 0.8rem !important;
}

/* --------------------------------------------------------------------------
 * Mobile consistency patch: catalog cards/buttons/prices
 * -------------------------------------------------------------------------- */
html body.woocommerce.tax-product_cat ul.products li.product:not(.product-category) .product-inner,
html body.woocommerce.tax-product_tag ul.products li.product:not(.product-category) .product-inner,
html body.woocommerce.post-type-archive-product ul.products li.product:not(.product-category) .product-inner,
html body.woocommerce.tax-product_cat ul.products li.product-category .product-inner,
html body.woocommerce.tax-product_tag ul.products li.product-category .product-inner,
html body.woocommerce.post-type-archive-product ul.products li.product-category .product-inner {
	border-radius: 16px !important;
	box-shadow: 0 6px 16px rgba(95, 70, 50, 0.08) !important;
}

html body.woocommerce.tax-product_cat ul.products li.product .product-image,
html body.woocommerce.tax-product_tag ul.products li.product .product-image,
html body.woocommerce.post-type-archive-product ul.products li.product .product-image {
	border-radius: 16px 16px 0 0 !important;
}

html body.woocommerce.tax-product_cat ul.products li.product .price,
html body.woocommerce.tax-product_tag ul.products li.product .price,
html body.woocommerce.post-type-archive-product ul.products li.product .price {
	font-size: 1rem !important;
	font-weight: 700 !important;
	color: var(--bb-brand-accent-strong, #6c4f36) !important;
}

html body.woocommerce.tax-product_cat ul.products li.product .price .amount,
html body.woocommerce.tax-product_tag ul.products li.product .price .amount,
html body.woocommerce.post-type-archive-product ul.products li.product .price .amount {
	color: var(--bb-brand-accent-strong, #6c4f36) !important;
	font-weight: 700 !important;
}

html body.woocommerce.tax-product_cat ul.products li.product a.button,
html body.woocommerce.tax-product_tag ul.products li.product a.button,
html body.woocommerce.post-type-archive-product ul.products li.product a.button,
html body.woocommerce.tax-product_cat ul.products li.product .add_to_cart_button,
html body.woocommerce.tax-product_tag ul.products li.product .add_to_cart_button,
html body.woocommerce.post-type-archive-product ul.products li.product .add_to_cart_button {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	min-height: 44px !important;
	border-radius: 12px !important;
	padding: 0.56rem 1rem !important;
	font-weight: 700 !important;
}

html body.woocommerce.tax-product_cat ul.products li.product .product-content,
html body.woocommerce.tax-product_tag ul.products li.product .product-content,
html body.woocommerce.post-type-archive-product ul.products li.product .product-content {
	text-align: center !important;
}

@media (max-width: 991px) {
	html body.woocommerce.tax-product_cat .porto-gb-921fb9d0d90d20b7f4b5f7b309184a0e,
	html body.woocommerce.tax-product_tag .porto-gb-921fb9d0d90d20b7f4b5f7b309184a0e,
	html body.woocommerce.post-type-archive-product .porto-gb-921fb9d0d90d20b7f4b5f7b309184a0e {
		display: none !important;
	}

	html body.woocommerce.tax-product_cat .porto-gb-223c9f8d8f931bf6236bb07895286f59,
	html body.woocommerce.tax-product_tag .porto-gb-223c9f8d8f931bf6236bb07895286f59,
	html body.woocommerce.post-type-archive-product .porto-gb-223c9f8d8f931bf6236bb07895286f59 {
		display: inline-flex !important;
		position: static !important;
		right: auto !important;
		bottom: auto !important;
		left: auto !important;
		margin: 0.2rem auto 0 !important;
		min-height: 44px !important;
		width: auto !important;
		min-width: 140px !important;
		padding: 0 0.9rem !important;
		border-radius: 12px !important;
		background: var(--bb-action-primary-bg, linear-gradient(135deg, #695a4d 0%, #4f463d 100%)) !important;
		border: 1px solid var(--bb-action-primary-border, rgba(122, 91, 63, 0.24)) !important;
		box-shadow: 0 6px 14px rgba(95, 70, 50, 0.12) !important;
		font-size: 0.84rem !important;
		font-weight: 700 !important;
		line-height: 1 !important;
		text-transform: none !important;
		align-items: center !important;
		justify-content: center !important;
	}

	html body.woocommerce.tax-product_cat .porto-gb-cbcfe381df198befc9b374ca77b73012 .price,
	html body.woocommerce.tax-product_tag .porto-gb-cbcfe381df198befc9b374ca77b73012 .price,
	html body.woocommerce.post-type-archive-product .porto-gb-cbcfe381df198befc9b374ca77b73012 .price,
	html body.woocommerce.tax-product_cat .porto-gb-cbcfe381df198befc9b374ca77b73012 .price .amount,
	html body.woocommerce.tax-product_tag .porto-gb-cbcfe381df198befc9b374ca77b73012 .price .amount,
	html body.woocommerce.post-type-archive-product .porto-gb-cbcfe381df198befc9b374ca77b73012 .price .amount {
		color: var(--bb-brand-accent-strong, #6c4f36) !important;
		font-weight: 800 !important;
	}

	html body.woocommerce.tax-product_cat .porto-tb-item .tb-hover-content,
	html body.woocommerce.tax-product_tag .porto-tb-item .tb-hover-content,
	html body.woocommerce.post-type-archive-product .porto-tb-item .tb-hover-content,
	html body.woocommerce.tax-product_cat .porto-tb-item .tb-hover-content.with-link,
	html body.woocommerce.tax-product_tag .porto-tb-item .tb-hover-content.with-link,
	html body.woocommerce.post-type-archive-product .porto-tb-item .tb-hover-content.with-link {
		position: static !important;
		inset: auto !important;
		display: flex !important;
		justify-content: center !important;
		align-items: center !important;
		gap: 0.5rem !important;
		margin-top: 0.6rem !important;
		visibility: visible !important;
		opacity: 1 !important;
		pointer-events: auto !important;
		transform: none !important;
		background: none !important;
	}

	html body.woocommerce.tax-product_cat .porto-tb-item .tb-hover-content .porto-tb-link,
	html body.woocommerce.tax-product_tag .porto-tb-item .tb-hover-content .porto-tb-link,
	html body.woocommerce.post-type-archive-product .porto-tb-item .tb-hover-content .porto-tb-link {
		display: none !important;
	}

	html body.woocommerce.tax-product_cat .porto-tb-item .porto-tb-woo-link.porto-tb-addcart,
	html body.woocommerce.tax-product_tag .porto-tb-item .porto-tb-woo-link.porto-tb-addcart,
	html body.woocommerce.post-type-archive-product .porto-tb-item .porto-tb-woo-link.porto-tb-addcart {
		position: static !important;
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center !important;
		width: auto !important;
		min-width: 132px !important;
		height: 44px !important;
		padding: 0 0.9rem !important;
		gap: 0.42rem !important;
		border-radius: 12px !important;
		background: var(--bb-action-primary-bg, linear-gradient(135deg, #695a4d 0%, #4f463d 100%)) !important;
		color: #fff !important;
		border: 1px solid var(--bb-action-primary-border, rgba(122, 91, 63, 0.24)) !important;
		box-shadow: 0 6px 14px rgba(95, 70, 50, 0.12) !important;
		transform: none !important;
	}

	/*
	 * 2026-04-19：按商品类型分别出文案（替换掉原先无条件 "View options"）。
	 * 简单商品 → "Add to cart"；可变商品 → "View options"；外链/组合商品兜底
	 * 用原生 title 属性（Porto + WooCommerce 已经写对了）。
	 */
	html body.woocommerce.tax-product_cat .porto-tb-item .porto-tb-woo-link.porto-tb-addcart.product_type_simple::after,
	html body.woocommerce.tax-product_tag .porto-tb-item .porto-tb-woo-link.porto-tb-addcart.product_type_simple::after,
	html body.woocommerce.post-type-archive-product .porto-tb-item .porto-tb-woo-link.porto-tb-addcart.product_type_simple::after {
		content: "Add to cart";
		font-size: 0.84rem;
		font-weight: 700;
		letter-spacing: 0.01em;
	}

	html body.woocommerce.tax-product_cat .porto-tb-item .porto-tb-woo-link.porto-tb-addcart.product_type_variable::after,
	html body.woocommerce.tax-product_tag .porto-tb-item .porto-tb-woo-link.porto-tb-addcart.product_type_variable::after,
	html body.woocommerce.post-type-archive-product .porto-tb-item .porto-tb-woo-link.porto-tb-addcart.product_type_variable::after {
		content: "View options";
		font-size: 0.84rem;
		font-weight: 700;
		letter-spacing: 0.01em;
	}

	html body.woocommerce.tax-product_cat .porto-tb-item .porto-tb-woo-link.porto-tb-addcart.product_type_external::after,
	html body.woocommerce.tax-product_tag .porto-tb-item .porto-tb-woo-link.porto-tb-addcart.product_type_external::after,
	html body.woocommerce.post-type-archive-product .porto-tb-item .porto-tb-woo-link.porto-tb-addcart.product_type_external::after,
	html body.woocommerce.tax-product_cat .porto-tb-item .porto-tb-woo-link.porto-tb-addcart.product_type_grouped::after,
	html body.woocommerce.tax-product_tag .porto-tb-item .porto-tb-woo-link.porto-tb-addcart.product_type_grouped::after,
	html body.woocommerce.post-type-archive-product .porto-tb-item .porto-tb-woo-link.porto-tb-addcart.product_type_grouped::after {
		content: attr(title);
		font-size: 0.84rem;
		font-weight: 700;
		letter-spacing: 0.01em;
	}

	html body.woocommerce.tax-product_cat .porto-tb-item .tb-woo-price .price,
	html body.woocommerce.tax-product_tag .porto-tb-item .tb-woo-price .price,
	html body.woocommerce.post-type-archive-product .porto-tb-item .tb-woo-price .price,
	html body.woocommerce.tax-product_cat .porto-tb-item .tb-woo-price .price .amount,
	html body.woocommerce.tax-product_tag .porto-tb-item .tb-woo-price .price .amount,
	html body.woocommerce.post-type-archive-product .porto-tb-item .tb-woo-price .price .amount {
		color: var(--bb-brand-accent-strong, #6c4f36) !important;
		font-size: 1.05rem !important;
		font-weight: 800 !important;
	}

	html body.woocommerce.tax-product_cat .page-top .page-title,
	html body.woocommerce.tax-product_tag .page-top .page-title,
	html body.woocommerce.post-type-archive-product .page-top .page-title {
		font-size: clamp(1.28rem, 5.6vw, 1.62rem) !important;
		line-height: 1.24 !important;
	}

	html body.woocommerce.tax-product_cat ul.products li.product .add-links-wrap,
	html body.woocommerce.tax-product_tag ul.products li.product .add-links-wrap,
	html body.woocommerce.post-type-archive-product ul.products li.product .add-links-wrap {
		position: static !important;
		margin-top: 0.6rem !important;
		display: flex !important;
		justify-content: center !important;
	}

	html body.woocommerce.tax-product_cat ul.products li.product .add-links,
	html body.woocommerce.tax-product_tag ul.products li.product .add-links,
	html body.woocommerce.post-type-archive-product ul.products li.product .add-links {
		position: static !important;
		display: inline-flex !important;
		gap: 0.45rem !important;
		align-items: center !important;
		justify-content: center !important;
		transform: none !important;
	}

	html body.woocommerce.tax-product_cat ul.products li.product .add-links a,
	html body.woocommerce.tax-product_tag ul.products li.product .add-links a,
	html body.woocommerce.post-type-archive-product ul.products li.product .add-links a {
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center !important;
		width: 40px !important;
		height: 40px !important;
		border-radius: 12px !important;
		border: 1px solid var(--bb-action-primary-border, rgba(122, 91, 63, 0.24)) !important;
		background: var(--bb-action-primary-bg, linear-gradient(135deg, #695a4d 0%, #4f463d 100%)) !important;
		color: #fff !important;
		box-shadow: 0 6px 14px rgba(95, 70, 50, 0.12) !important;
	}

	html body.woocommerce.tax-product_cat .archive-products .porto-tb-item .tb-hover-content,
	html body.woocommerce.tax-product_tag .archive-products .porto-tb-item .tb-hover-content,
	html body.woocommerce.post-type-archive-product .archive-products .porto-tb-item .tb-hover-content {
		position: static !important;
		inset: auto !important;
		display: flex !important;
		justify-content: center !important;
		align-items: center !important;
		gap: 0.5rem !important;
		margin-top: 0.6rem !important;
		visibility: visible !important;
		opacity: 1 !important;
		pointer-events: auto !important;
		transform: none !important;
	}

	html body.woocommerce.tax-product_cat .archive-products .porto-tb-item .tb-hover-content .porto-tb-link,
	html body.woocommerce.tax-product_tag .archive-products .porto-tb-item .tb-hover-content .porto-tb-link,
	html body.woocommerce.post-type-archive-product .archive-products .porto-tb-item .tb-hover-content .porto-tb-link {
		display: none !important;
	}

	html body.woocommerce.tax-product_cat .archive-products .porto-tb-item .porto-tb-woo-link.porto-tb-addcart,
	html body.woocommerce.tax-product_tag .archive-products .porto-tb-item .porto-tb-woo-link.porto-tb-addcart,
	html body.woocommerce.post-type-archive-product .archive-products .porto-tb-item .porto-tb-woo-link.porto-tb-addcart {
		position: static !important;
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center !important;
		width: auto !important;
		min-width: 132px !important;
		height: 44px !important;
		padding: 0 0.9rem !important;
		gap: 0.42rem !important;
		border-radius: 12px !important;
		background: var(--bb-action-primary-bg, linear-gradient(135deg, #695a4d 0%, #4f463d 100%)) !important;
		color: #fff !important;
		border: 1px solid var(--bb-action-primary-border, rgba(122, 91, 63, 0.24)) !important;
		box-shadow: 0 6px 14px rgba(95, 70, 50, 0.12) !important;
		transform: none !important;
	}

	html body.woocommerce.tax-product_cat .archive-products .porto-tb-item .porto-tb-woo-link.porto-tb-addcart.product_type_simple::after,
	html body.woocommerce.tax-product_tag .archive-products .porto-tb-item .porto-tb-woo-link.porto-tb-addcart.product_type_simple::after,
	html body.woocommerce.post-type-archive-product .archive-products .porto-tb-item .porto-tb-woo-link.porto-tb-addcart.product_type_simple::after {
		content: "Add to cart";
		font-size: 0.84rem;
		font-weight: 700;
		letter-spacing: 0.01em;
	}

	html body.woocommerce.tax-product_cat .archive-products .porto-tb-item .porto-tb-woo-link.porto-tb-addcart.product_type_variable::after,
	html body.woocommerce.tax-product_tag .archive-products .porto-tb-item .porto-tb-woo-link.porto-tb-addcart.product_type_variable::after,
	html body.woocommerce.post-type-archive-product .archive-products .porto-tb-item .porto-tb-woo-link.porto-tb-addcart.product_type_variable::after {
		content: "View options";
		font-size: 0.84rem;
		font-weight: 700;
		letter-spacing: 0.01em;
	}

	html body.woocommerce.tax-product_cat .archive-products .porto-tb-item .porto-tb-woo-link.porto-tb-addcart.product_type_external::after,
	html body.woocommerce.tax-product_tag .archive-products .porto-tb-item .porto-tb-woo-link.porto-tb-addcart.product_type_external::after,
	html body.woocommerce.post-type-archive-product .archive-products .porto-tb-item .porto-tb-woo-link.porto-tb-addcart.product_type_external::after,
	html body.woocommerce.tax-product_cat .archive-products .porto-tb-item .porto-tb-woo-link.porto-tb-addcart.product_type_grouped::after,
	html body.woocommerce.tax-product_tag .archive-products .porto-tb-item .porto-tb-woo-link.porto-tb-addcart.product_type_grouped::after,
	html body.woocommerce.post-type-archive-product .archive-products .porto-tb-item .porto-tb-woo-link.porto-tb-addcart.product_type_grouped::after {
		content: attr(title);
		font-size: 0.84rem;
		font-weight: 700;
		letter-spacing: 0.01em;
	}

	html body.woocommerce.tax-product_cat .archive-products .porto-tb-item .tb-woo-price .price,
	html body.woocommerce.tax-product_tag .archive-products .porto-tb-item .tb-woo-price .price,
	html body.woocommerce.post-type-archive-product .archive-products .porto-tb-item .tb-woo-price .price,
	html body.woocommerce.tax-product_cat .archive-products .porto-tb-item .tb-woo-price .price .amount,
	html body.woocommerce.tax-product_tag .archive-products .porto-tb-item .tb-woo-price .price .amount,
	html body.woocommerce.post-type-archive-product .archive-products .porto-tb-item .tb-woo-price .price .amount {
		color: var(--bb-brand-accent-strong, #6c4f36) !important;
		font-size: 1.05rem !important;
		font-weight: 800 !important;
	}
}

/* =========================================================================
   Bugfix: category sidebar drops below products at 992–1399px
   -------------------------------------------------------------------------
   Porto `media-mobile-sidebar.css` turns every `.sidebar.mobile-sidebar`
   into an off-canvas drawer:
     .mobile-sidebar {
         position: fixed; width: 290px; height: 100%;
         transform: translateX(-100%); z-index: 9000;
         background: var(--porto-body-bg); transition: transform .2s;
     }
   Our earlier override only reset position/transform/top/left etc., but
   did NOT reset width/height/z-index/background/transition/overflow, so
   in some viewports the drawer's residual properties made the sidebar
   break out of the flex row (or cover the page) and it ended up rendered
   after the product loop at page bottom.
   We now neutralise the drawer completely at ≥768px so `.mobile-sidebar`
   behaves like a plain static block column, side-by-side with products.
   ========================================================================= */
@media (min-width: 768px) {
	html body.woocommerce.tax-product_cat #main .row.main-content-wrap > .sidebar.mobile-sidebar,
	html body.woocommerce.tax-product_tag #main .row.main-content-wrap > .sidebar.mobile-sidebar,
	html body.woocommerce.post-type-archive-product #main .row.main-content-wrap > .sidebar.mobile-sidebar,
	html body.woocommerce.tax-product_cat #main .sidebar.mobile-sidebar.porto-woo-category-sidebar,
	html body.woocommerce.tax-product_tag #main .sidebar.mobile-sidebar.porto-woo-category-sidebar,
	html body.woocommerce.post-type-archive-product #main .sidebar.mobile-sidebar.porto-woo-category-sidebar {
		position: static !important;
		top: auto !important;
		right: auto !important;
		bottom: auto !important;
		left: auto !important;
		transform: none !important;
		transition: none !important;
		height: auto !important;
		min-height: 0 !important;
		max-height: none !important;
		width: 320px !important;
		min-width: 320px !important;
		max-width: 320px !important;
		flex: 0 0 320px !important;
		z-index: auto !important;
		background: transparent !important;
		margin-top: 0 !important;
		padding-top: 0 !important;
		padding-bottom: 0 !important;
		overflow: visible !important;
		display: block !important;
		visibility: visible !important;
		opacity: 1 !important;
		float: none !important;
	}

	html body.woocommerce.tax-product_cat #main .sidebar.mobile-sidebar .sidebar-toggle,
	html body.woocommerce.tax-product_tag #main .sidebar.mobile-sidebar .sidebar-toggle,
	html body.woocommerce.post-type-archive-product #main .sidebar.mobile-sidebar .sidebar-toggle {
		display: none !important;
	}
}

/* =========================================================================
   2026-04-19：手机端（<768px）目录页侧边栏统一策略
   -------------------------------------------------------------------------
   症状（用户反馈）：分类页往下滑时右边会出现一个小按钮（Porto 的
   .sidebar-toggle 抽屉触发器），点击没反应。
   根因：
     1. Porto 默认 .mobile-sidebar 是 position:fixed translateX(-100%)
        抽屉，点击 .sidebar-toggle 靠 Porto JS 切换 html.sidebar-opened
        滑入。
     2. buildbarn-header-rocket-compat.php 的 rebuilt-cat-sidebar 脚本
        会在 scroll 时把整个 .sidebar 强制 position:static，破坏抽屉的
        滑入定位；加上我们把 .sidebar-content 换成了 rebuilt 内容，
        Porto 旧 toggle JS 已失去语义。
     3. 结果：按钮悬浮在右边看起来可交互，但点了打不开任何东西。
   方案：不修 Porto 抽屉，改为在手机端直接把 sidebar 放进正常文档流
        （宽度 100%、静态定位），让我们自己的 rebuilt-cat-sidebar 在
        商品列表上方以一张小卡片呈现；同时彻底隐藏 .sidebar-toggle / 
        .sidebar-overlay，消除死按钮。
   作用域：tax-product_cat / tax-product_tag / post-type-archive-product
   ========================================================================= */
@media (max-width: 767.98px) {
	/* Sidebar 容器：拆掉 Porto 抽屉的 fixed + transform，改成正常块级。 */
	html body.woocommerce.tax-product_cat #main .row.main-content-wrap > .sidebar.mobile-sidebar,
	html body.woocommerce.tax-product_tag #main .row.main-content-wrap > .sidebar.mobile-sidebar,
	html body.woocommerce.post-type-archive-product #main .row.main-content-wrap > .sidebar.mobile-sidebar,
	html body.woocommerce.tax-product_cat #main .sidebar.mobile-sidebar.porto-woo-category-sidebar,
	html body.woocommerce.tax-product_tag #main .sidebar.mobile-sidebar.porto-woo-category-sidebar,
	html body.woocommerce.post-type-archive-product #main .sidebar.mobile-sidebar.porto-woo-category-sidebar {
		position: static !important;
		top: auto !important;
		right: auto !important;
		bottom: auto !important;
		left: auto !important;
		transform: none !important;
		transition: none !important;
		height: auto !important;
		min-height: 0 !important;
		max-height: none !important;
		width: 100% !important;
		min-width: 0 !important;
		max-width: 100% !important;
		flex: 0 0 100% !important;
		z-index: auto !important;
		background: transparent !important;
		margin: 0 0 12px 0 !important;
		padding: 0 !important;
		overflow: visible !important;
		display: block !important;
		visibility: visible !important;
		opacity: 1 !important;
		float: none !important;
	}

	/* Porto 在 mobile-sidebar 内嵌的 [data-plugin-sticky] 也同步拆掉定位。 */
	html body.woocommerce.tax-product_cat #main .sidebar.mobile-sidebar > [data-plugin-sticky],
	html body.woocommerce.tax-product_tag #main .sidebar.mobile-sidebar > [data-plugin-sticky],
	html body.woocommerce.post-type-archive-product #main .sidebar.mobile-sidebar > [data-plugin-sticky],
	html body.woocommerce.tax-product_cat #main .sidebar.mobile-sidebar .sticky-wrapper,
	html body.woocommerce.tax-product_tag #main .sidebar.mobile-sidebar .sticky-wrapper,
	html body.woocommerce.post-type-archive-product #main .sidebar.mobile-sidebar .sticky-wrapper {
		position: static !important;
		top: auto !important;
		bottom: auto !important;
		left: auto !important;
		right: auto !important;
		transform: none !important;
		height: auto !important;
		width: 100% !important;
	}

	html body.woocommerce.tax-product_cat #main .sidebar.mobile-sidebar .sidebar-content,
	html body.woocommerce.tax-product_tag #main .sidebar.mobile-sidebar .sidebar-content,
	html body.woocommerce.post-type-archive-product #main .sidebar.mobile-sidebar .sidebar-content {
		position: static !important;
		height: auto !important;
		max-height: none !important;
		width: 100% !important;
		padding: 0 !important;
		overflow: visible !important;
	}

	/* 死按钮全部隐藏：Porto 抽屉触发器 + 遮罩。 */
	html body.woocommerce.tax-product_cat #main .sidebar-toggle,
	html body.woocommerce.tax-product_tag #main .sidebar-toggle,
	html body.woocommerce.post-type-archive-product #main .sidebar-toggle,
	html body.woocommerce.tax-product_cat #main .sidebar.mobile-sidebar .sidebar-toggle,
	html body.woocommerce.tax-product_tag #main .sidebar.mobile-sidebar .sidebar-toggle,
	html body.woocommerce.post-type-archive-product #main .sidebar.mobile-sidebar .sidebar-toggle,
	html body.woocommerce.tax-product_cat #main .sidebar-menu-toggle,
	html body.woocommerce.tax-product_tag #main .sidebar-menu-toggle,
	html body.woocommerce.post-type-archive-product #main .sidebar-menu-toggle,
	html body.woocommerce.tax-product_cat #main .shop-sidebar-toggle,
	html body.woocommerce.tax-product_tag #main .shop-sidebar-toggle,
	html body.woocommerce.post-type-archive-product #main .shop-sidebar-toggle,
	html body.woocommerce.tax-product_cat #main .mobile-sidebar-toggle,
	html body.woocommerce.tax-product_tag #main .mobile-sidebar-toggle,
	html body.woocommerce.post-type-archive-product #main .mobile-sidebar-toggle,
	html body.woocommerce.tax-product_cat .sidebar-overlay,
	html body.woocommerce.tax-product_tag .sidebar-overlay,
	html body.woocommerce.post-type-archive-product .sidebar-overlay {
		display: none !important;
		visibility: hidden !important;
		opacity: 0 !important;
		pointer-events: none !important;
	}

	/* main-content-wrap 改为列式堆叠，sidebar 压在产品上方。 */
	html body.woocommerce.tax-product_cat #main .row.main-content-wrap,
	html body.woocommerce.tax-product_tag #main .row.main-content-wrap,
	html body.woocommerce.post-type-archive-product #main .row.main-content-wrap {
		display: flex !important;
		flex-direction: column !important;
		flex-wrap: nowrap !important;
	}
}

/* =========================================================================
   Bugfix: hide broken grid/list view switcher (list template is empty)
   -------------------------------------------------------------------------
   BuildBarn's Porto Template Builder only configured the *grid* view; the
   list-view template under `porto-products54xl` was never populated, so
   clicking "View as list" navigates to `?gridcookie=list` and the product
   loop renders zero items (hence the "blank on click" symptom the user
   reported).  Hide the switcher entirely — there's nothing to switch to.
   (The companion MU-plugin `buildbarn-porto-shop-view-grid-force.php`
   additionally resets any stale Porto view cookies so returning visitors
   who previously flipped to list mode don't get stuck on a blank archive.)
   ========================================================================= */
html body.woocommerce.tax-product_cat a#grid.porto-icon-mode-grid,
html body.woocommerce.tax-product_cat a#list.porto-icon-mode-list,
html body.woocommerce.tax-product_tag a#grid.porto-icon-mode-grid,
html body.woocommerce.tax-product_tag a#list.porto-icon-mode-list,
html body.woocommerce.post-type-archive-product a#grid.porto-icon-mode-grid,
html body.woocommerce.post-type-archive-product a#list.porto-icon-mode-list,
html body.woocommerce.tax-product_cat a[aria-label="View as grid"],
html body.woocommerce.tax-product_cat a[aria-label="View as list"],
html body.woocommerce.tax-product_tag a[aria-label="View as grid"],
html body.woocommerce.tax-product_tag a[aria-label="View as list"],
html body.woocommerce.post-type-archive-product a[aria-label="View as grid"],
html body.woocommerce.post-type-archive-product a[aria-label="View as list"] {
	display: none !important;
}
