/*
 * Joy Site Enhancements front-end styles.
 * Structural selectors are deliberately scoped to plugin markup or verified
 * WooCommerce archive components; no global overflow or FSE template rule is used.
 */

.joy-product-category-nav,
.joy-contact-rail,
.joy-legacy-float-cluster,
.joy-legacy-wechat-wrap,
body.tax-product_cat,
body.woocommerce-shop {
	--joy-purple: #5c0ea2;
	--joy-purple-dark: #450779;
	--joy-purple-pale: #f0e7f8;
	--joy-orange: #e96816;
	--joy-orange-dark: #b94608;
	--joy-whatsapp: #128c4a;
	--joy-whatsapp-dark: #0a6b36;
	--joy-wechat: #058f46;
	--joy-wechat-dark: #046c36;
	--joy-ink: #24162e;
	--joy-muted: #6f6278;
	--joy-line: #dfd1e9;
	--joy-white: #fff;
}

/* Product-category navigation injected after the existing Product Search block. */
.joy-product-category-nav {
	box-sizing: border-box;
	inline-size: 100%;
	margin-block-start: 1.25rem;
	padding: 1rem;
	border: 1px solid var(--joy-line);
	border-radius: 20px;
	background: linear-gradient(145deg, var(--joy-white), #fbf8fd);
	box-shadow: 0 12px 30px rgb(69 7 121 / 9%);
	color: var(--joy-ink);
}

.joy-product-category-nav *,
.joy-contact-rail *,
.joy-legacy-float-cluster * {
	box-sizing: border-box;
}

.joy-product-category-nav__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-block-end: 0.8rem;
}

.joy-product-category-nav__title {
	margin: 0;
	color: var(--joy-ink);
	font-size: clamp(1rem, 1.4vw, 1.25rem);
	font-weight: 750;
	line-height: 1.25;
	letter-spacing: -0.015em;
}

.joy-product-category-nav__toggle {
	display: none;
	min-block-size: 44px;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	padding: 0.6rem 0.8rem;
	border: 0;
	border-radius: 12px;
	background: var(--joy-purple);
	box-shadow: 0 5px 14px rgb(69 7 121 / 16%);
	color: var(--joy-white);
	font: inherit;
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	touch-action: manipulation;
}

.joy-product-category-nav__toggle:hover {
	background: var(--joy-purple-dark);
}

.joy-product-category-nav__toggle:focus-visible,
.joy-product-category-nav__link:focus-visible {
	outline: 3px solid #ffb24a;
	outline-offset: 3px;
}

.joy-category-chevron {
	inline-size: 18px;
	block-size: 18px;
	flex: 0 0 auto;
	transition: transform 180ms ease;
}

.joy-product-category-nav__toggle[aria-expanded="true"] .joy-category-chevron {
	transform: rotate(180deg);
}

.joy-product-category-nav__panel[hidden] {
	display: none !important;
}

.joy-product-category-nav__list {
	display: grid;
	gap: 0.48rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.joy-product-category-nav__list--nested {
	margin-block-start: 0.48rem;
	margin-inline-start: 0.7rem;
	padding-inline-start: 0.65rem;
	border-inline-start: 2px solid var(--joy-purple-pale);
}

.joy-product-category-nav__item {
	min-inline-size: 0;
	margin: 0;
	padding: 0;
}

.joy-product-category-nav__link {
	display: flex;
	min-block-size: 44px;
	align-items: center;
	justify-content: space-between;
	gap: 0.7rem;
	padding: 0.62rem 0.72rem;
	border: 1px solid transparent;
	border-radius: 13px;
	background: var(--joy-purple-pale);
	color: var(--joy-purple-dark);
	font-size: 0.94rem;
	font-weight: 680;
	line-height: 1.25;
	text-decoration: none;
	transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.joy-product-category-nav__link:hover {
	border-color: rgb(92 14 162 / 22%);
	background: #e9daf5;
	color: var(--joy-purple-dark);
	box-shadow: 0 6px 16px rgb(69 7 121 / 10%);
	transform: translateY(-1px);
}

.joy-product-category-nav__item.is-ancestor > .joy-product-category-nav__link {
	border-color: rgb(233 104 22 / 42%);
	background: #fff3eb;
	color: var(--joy-orange-dark);
}

.joy-product-category-nav__item.is-current > .joy-product-category-nav__link {
	border-color: var(--joy-purple);
	background: linear-gradient(135deg, var(--joy-purple), var(--joy-purple-dark));
	box-shadow: 0 8px 18px rgb(69 7 121 / 20%);
	color: var(--joy-white);
}

.joy-product-category-nav__name {
	min-inline-size: 0;
	overflow-wrap: anywhere;
}

.joy-product-category-nav__count {
	display: inline-grid;
	min-inline-size: 1.75rem;
	min-block-size: 1.75rem;
	flex: 0 0 auto;
	place-items: center;
	padding-inline: 0.4rem;
	border-radius: 999px;
	background: rgb(255 255 255 / 78%);
	color: var(--joy-purple-dark);
	font-size: 0.75rem;
	font-variant-numeric: tabular-nums;
	font-weight: 800;
}

.joy-product-category-nav__item.is-current > .joy-product-category-nav__link .joy-product-category-nav__count {
	background: rgb(255 255 255 / 18%);
	color: var(--joy-white);
}

/* Polish the existing Shop Product Categories block without injecting another list. */
body.woocommerce-shop .shop-sidebar .wp-block-woocommerce-product-categories {
	box-sizing: border-box;
	inline-size: 100%;
	margin-block-start: 1.25rem;
	padding: 1rem;
	border: 1px solid var(--joy-line);
	border-radius: 20px;
	background: linear-gradient(145deg, var(--joy-white), #fbf8fd);
	box-shadow: 0 12px 30px rgb(69 7 121 / 9%);
	color: var(--joy-ink);
}

body.woocommerce-shop .shop-sidebar .wp-block-woocommerce-product-categories * {
	box-sizing: border-box;
}

body.woocommerce-shop .shop-sidebar .wp-block-woocommerce-product-categories :where(
	ul.wc-block-product-categories-list,
	ul.wc-block-product-categories-list ul
) {
	display: grid;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

body.woocommerce-shop .shop-sidebar .wp-block-woocommerce-product-categories ul.wc-block-product-categories-list ul {
	margin-block-start: 0.5rem;
	margin-inline-start: 0.7rem;
	padding-inline-start: 0.65rem;
	border-inline-start: 2px solid var(--joy-purple-pale);
}

body.woocommerce-shop .shop-sidebar .wp-block-woocommerce-product-categories .wc-block-product-categories-list-item {
	min-inline-size: 0;
	margin: 0;
	padding: 0;
}

body.woocommerce-shop .shop-sidebar .wp-block-woocommerce-product-categories .wc-block-product-categories-list-item > a {
	display: flex;
	min-block-size: 44px;
	inline-size: 100%;
	align-items: center;
	padding: 0.65rem 0.75rem;
	border: 1px solid transparent;
	border-radius: 13px;
	background: var(--joy-purple-pale);
	color: var(--joy-purple-dark);
	font-weight: 680;
	line-height: 1.25;
	overflow-wrap: anywhere;
	text-decoration: none;
	transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

body.woocommerce-shop .shop-sidebar .wp-block-woocommerce-product-categories .wc-block-product-categories-list-item > a:hover {
	border-color: rgb(92 14 162 / 22%);
	background: #e9daf5;
	box-shadow: 0 6px 16px rgb(69 7 121 / 10%);
	color: var(--joy-purple-dark);
	transform: translateY(-1px);
}

body.woocommerce-shop .shop-sidebar .wp-block-woocommerce-product-categories .wc-block-product-categories-list-item > a:focus-visible {
	outline: 3px solid #ffb24a;
	outline-offset: 3px;
}

body.woocommerce-shop .shop-sidebar .wp-block-woocommerce-product-categories .wc-block-product-categories-list-item-count {
	font-size: 0.78rem;
	font-variant-numeric: tabular-nums;
	font-weight: 750;
}

/*
 * Preserve the existing FSE 25/75 archive columns. Only harden flex descendants
 * with min-width: 0, then make the existing sidebar sticky on desktop.
 */
@media (min-width: 782px) {
	body.tax-product_cat .wp-block-columns:has(> .shop-sidebar) > .wp-block-column {
		min-inline-size: 0;
		max-inline-size: 100%;
	}

	body.tax-product_cat .shop-sidebar {
		position: sticky;
		top: 2rem;
		align-self: flex-start;
		max-block-size: calc(100dvh - 4rem);
		overflow-y: auto;
		overscroll-behavior: contain;
		scrollbar-gutter: stable;
	}

	body.admin-bar.tax-product_cat .shop-sidebar {
		top: 4rem;
		max-block-size: calc(100dvh - 5rem);
	}
}

/* Correct the oversized archive title only on WooCommerce product categories. */
body.tax-product_cat :where(h1.wp-block-query-title, main h1.wp-block-query-title) {
	max-inline-size: 100%;
	margin-inline: 0;
	font-size: clamp(2.25rem, 4.8vw, 3.75rem) !important;
	line-height: 1.02 !important;
	letter-spacing: -0.045em;
	overflow-wrap: anywhere;
	text-wrap: balance;
}

/*
 * Scoped overflow containment for the archive's content column and Woo grids.
 * There is intentionally no html/body overflow-x rule.
 */
body.tax-product_cat .shop-sidebar + .wp-block-column,
body.tax-product_cat .wp-block-columns:has(> .shop-sidebar) > .wp-block-column:not(.shop-sidebar),
body.tax-product_cat :where(
	.wp-block-woocommerce-product-collection,
	.wp-block-woocommerce-product-template,
	.wc-block-product-template,
	[data-block-name="woocommerce/product-collection"],
	ul.products
) {
	min-inline-size: 0;
	max-inline-size: 100%;
}

body.tax-product_cat :where(
	.wp-block-woocommerce-product-collection,
	.wp-block-woocommerce-product-template,
	.wc-block-product-template,
	[data-block-name="woocommerce/product-collection"],
	ul.products
) {
	inline-size: 100%;
	overflow-x: clip;
}

/*
 * The verified Product Collection has four cards fully inside its roughly
 * 945px content track. Preserve that four-up desktop layout while replacing
 * intrinsic flex widths with bounded grid tracks.
 */
body.tax-product_cat [data-block-name="woocommerce/product-collection"] .wc-block-product-template.columns-4 {
	display: grid !important;
	grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
	gap: clamp(1rem, 2vw, 1.75rem) !important;
	inline-size: 100% !important;
	max-inline-size: 100%;
	margin-inline: 0 !important;
	padding-inline: 0;
}

body.tax-product_cat [data-block-name="woocommerce/product-collection"] .wc-block-product-template.columns-4 > * {
	min-inline-size: 0;
	inline-size: auto !important;
	max-inline-size: 100%;
	margin-inline: 0 !important;
	flex: none !important;
}

body.tax-product_cat :where(
	.wp-block-woocommerce-product-template > *,
	.wc-block-product-template > *,
	ul.products > li.product
) {
	min-inline-size: 0;
	max-inline-size: 100%;
}

body.tax-product_cat :where(
	.wp-block-woocommerce-product-template,
	.wc-block-product-template,
	ul.products
) img {
	display: block;
	max-inline-size: 100%;
	block-size: auto;
}

@supports not (overflow: clip) {
	body.tax-product_cat :where(
		.wp-block-woocommerce-product-collection,
		.wp-block-woocommerce-product-template,
		.wc-block-product-template,
		[data-block-name="woocommerce/product-collection"],
		ul.products
	) {
		overflow-x: hidden;
	}
}

/* Sitewide contact rail output on non-front pages. */
.joy-contact-rail {
	position: fixed;
	z-index: 9998;
	inset-block-start: 50%;
	inset-inline-end: max(14px, env(safe-area-inset-right));
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
	padding: 0;
	transform: translateY(-50%);
}

.joy-contact-rail__item {
	position: relative;
	display: block;
	inline-size: 52px;
	block-size: 52px;
	margin: 0;
	padding: 0;
}

.joy-contact-rail__button {
	position: relative;
	display: inline-flex;
	inline-size: 52px;
	block-size: 52px;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
	border: 1px solid rgb(255 255 255 / 36%);
	border-radius: 15px;
	background: var(--joy-purple);
	box-shadow: 0 7px 20px rgb(36 22 46 / 22%);
	color: var(--joy-white);
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	touch-action: manipulation;
	transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.joy-contact-rail__button--email,
.joy-legacy-float-link.joy-action--email {
	background: var(--joy-orange-dark);
}

.joy-contact-rail__button--whatsapp,
.joy-legacy-float-link.joy-action--whatsapp {
	background: var(--joy-whatsapp);
}

.joy-contact-rail__button--phone,
.joy-legacy-float-link.joy-action--phone {
	background: var(--joy-purple);
}

.joy-contact-rail__button--wechat,
.joy-legacy-float-link.joy-action--wechat {
	background: var(--joy-wechat);
}

.joy-contact-rail__button:hover {
	background: var(--joy-purple-dark);
	box-shadow: 0 10px 26px rgb(36 22 46 / 28%);
	color: var(--joy-white);
	transform: translateY(-2px) scale(1.025);
}

.joy-contact-rail__button--email:hover,
.joy-legacy-float-link.joy-action--email:hover {
	background: #963904;
}

.joy-contact-rail__button--whatsapp:hover,
.joy-legacy-float-link.joy-action--whatsapp:hover {
	background: var(--joy-whatsapp-dark);
}

.joy-contact-rail__button--phone:hover,
.joy-legacy-float-link.joy-action--phone:hover {
	background: var(--joy-purple-dark);
}

.joy-contact-rail__button--wechat:hover,
.joy-legacy-float-link.joy-action--wechat:hover {
	background: var(--joy-wechat-dark);
}

.joy-contact-rail__button:focus-visible {
	outline: 3px solid #ffb24a;
	outline-offset: 3px;
}

.joy-icon {
	display: block;
	inline-size: 25px;
	block-size: 25px;
	flex: 0 0 auto;
}

.joy-contact-rail__tooltip {
	position: absolute;
	z-index: 2;
	inset-block-start: 50%;
	inset-inline-end: calc(100% + 10px);
	inline-size: max-content;
	max-inline-size: 12rem;
	padding: 0.48rem 0.68rem;
	border-radius: 9px;
	background: var(--joy-ink);
	box-shadow: 0 5px 14px rgb(36 22 46 / 20%);
	color: var(--joy-white);
	font-size: 0.78rem;
	font-weight: 700;
	line-height: 1.2;
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
	transform: translate(6px, -50%);
	transition: opacity 130ms ease, transform 130ms ease, visibility 130ms ease;
}

.joy-contact-rail__button:hover .joy-contact-rail__tooltip,
.joy-contact-rail__button:focus-visible .joy-contact-rail__tooltip {
	opacity: 1;
	visibility: visible;
	transform: translate(0, -50%);
}

.joy-contact-rail__wechat-panel,
.joy-legacy-wechat-popover {
	position: absolute;
	z-index: 3;
	inset-block-end: 0;
	inset-inline-end: calc(100% + 12px);
	display: grid;
	inline-size: 212px;
	place-items: center;
	gap: 0.55rem;
	padding: 0.8rem;
	border: 1px solid var(--joy-line);
	border-radius: 18px;
	background: var(--joy-white);
	box-shadow: 0 14px 38px rgb(36 22 46 / 24%);
	color: var(--joy-ink);
	font-size: 0.86rem;
	font-weight: 750;
	line-height: 1.2;
	text-align: center;
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
	transform: translateX(8px) scale(0.98);
	transform-origin: bottom right;
	transition: opacity 150ms ease, transform 150ms ease, visibility 150ms ease;
}

.joy-contact-rail__wechat-panel::after,
.joy-legacy-wechat-popover::after {
	position: absolute;
	inset-block: 0;
	inset-inline-end: -12px;
	inline-size: 12px;
	content: "";
}

.joy-contact-rail__wechat-panel img,
.joy-legacy-wechat-popover img {
	display: block;
	inline-size: 180px;
	block-size: 180px;
	margin: 0;
	border: 0;
	border-radius: 11px;
	object-fit: cover;
}

.joy-contact-rail__item--wechat.is-open .joy-contact-rail__wechat-panel,
.joy-legacy-wechat-wrap.is-open .joy-legacy-wechat-popover,
html:not(.joy-has-js) .joy-contact-rail__item--wechat:focus-within .joy-contact-rail__wechat-panel,
html:not(.joy-has-js) .joy-legacy-wechat-wrap:focus-within .joy-legacy-wechat-popover {
	pointer-events: auto;
	opacity: 1;
	visibility: visible;
	transform: translateX(0) scale(1);
}

@media (hover: hover) and (pointer: fine) {
	html:not(.joy-has-js) .joy-contact-rail__item--wechat:hover .joy-contact-rail__wechat-panel,
	html:not(.joy-has-js) .joy-legacy-wechat-wrap:hover .joy-legacy-wechat-popover {
		pointer-events: auto;
		opacity: 1;
		visibility: visible;
		transform: translateX(0) scale(1);
	}
}

/* Enhance legacy front-page .float-btn markup instead of outputting a second rail. */
body.home .float-btn.joy-legacy-float-cluster {
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	gap: 8px !important;
	right: max(14px, env(safe-area-inset-right)) !important;
	inset-inline-end: max(14px, env(safe-area-inset-right)) !important;
}

body.home .float-btn.joy-legacy-float-cluster > .joy-legacy-float-item {
	margin: 0 !important;
}

/* The legacy .wechat div is only a neutral wrapper around one real button. */
body.home .float-btn.joy-legacy-float-cluster > .joy-legacy-wechat-wrap {
	position: relative !important;
	display: block !important;
	inline-size: 52px !important;
	block-size: 52px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	color: inherit !important;
	cursor: default !important;
	overflow: visible !important;
	transform: none !important;
	transition: none !important;
}

body.home .joy-legacy-float-link {
	-webkit-appearance: none !important;
	appearance: none !important;
	position: relative !important;
	display: inline-flex !important;
	inline-size: 52px !important;
	block-size: 52px !important;
	align-items: center !important;
	justify-content: center !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 1px solid rgb(255 255 255 / 36%) !important;
	border-radius: 15px !important;
	background: var(--joy-purple, #5c0ea2) !important;
	box-shadow: 0 7px 20px rgb(36 22 46 / 22%) !important;
	color: #fff !important;
	font: inherit !important;
	line-height: 1 !important;
	text-decoration: none !important;
	cursor: pointer;
	overflow: visible !important;
	touch-action: manipulation;
	transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

body.home .joy-legacy-float-link.joy-action--whatsapp {
	background: var(--joy-whatsapp, #128c4a) !important;
}

body.home .joy-legacy-float-link.joy-action--email {
	background: var(--joy-orange-dark, #b94608) !important;
}

body.home .joy-legacy-float-link.joy-action--phone {
	background: var(--joy-purple, #5c0ea2) !important;
}

body.home .joy-legacy-float-link.joy-action--wechat {
	background: var(--joy-wechat, #058f46) !important;
}

body.home .joy-legacy-float-link.joy-action--whatsapp:hover {
	background: var(--joy-whatsapp-dark, #0a6b36) !important;
}

body.home .joy-legacy-float-link.joy-action--email:hover {
	background: #963904 !important;
}

body.home .joy-legacy-float-link.joy-action--phone:hover {
	background: var(--joy-purple-dark, #450779) !important;
}

body.home .joy-legacy-float-link.joy-action--wechat:hover {
	background: var(--joy-wechat-dark, #046c36) !important;
}

body.home .joy-legacy-float-link:hover,
body.home .joy-legacy-float-link:focus-visible {
	box-shadow: 0 10px 26px rgb(36 22 46 / 28%) !important;
	transform: translateY(-2px) scale(1.025);
}

body.home .joy-legacy-float-link > i,
body.home .joy-legacy-float-link > svg {
	color: #fff !important;
}

body.home .joy-legacy-float-link:focus-visible {
	outline: 3px solid #ffb24a !important;
	outline-offset: 3px !important;
}

body.home .joy-legacy-float-link:hover .joy-contact-rail__tooltip,
body.home .joy-legacy-float-link:focus-visible .joy-contact-rail__tooltip {
	opacity: 1;
	visibility: visible;
	transform: translate(0, -50%);
}

.joy-legacy-wechat-wrap {
	position: relative;
}

body.home .float-btn.joy-legacy-float-cluster > .joy-legacy-wechat-wrap .joy-legacy-wechat-popover {
	position: absolute !important;
	z-index: 3 !important;
	inset-block-end: 0 !important;
	top: auto !important;
	left: auto !important;
	inset-block-start: auto !important;
	inset-inline-start: auto !important;
	right: calc(100% + 12px) !important;
	inset-inline-end: calc(100% + 12px) !important;
	display: grid !important;
	inline-size: 212px !important;
	block-size: auto !important;
	place-items: center !important;
	gap: 0.55rem !important;
	margin: 0 !important;
	padding: 0.8rem !important;
	border: 1px solid var(--joy-line) !important;
	border-radius: 18px !important;
	background: var(--joy-white) !important;
	box-shadow: 0 14px 38px rgb(36 22 46 / 24%) !important;
	color: var(--joy-ink) !important;
	font-size: 0.86rem !important;
	font-weight: 750 !important;
	line-height: 1.2 !important;
	text-align: center !important;
	pointer-events: none !important;
	opacity: 0 !important;
	visibility: hidden !important;
	transform: translateX(8px) scale(0.98) !important;
}

body.home .float-btn.joy-legacy-float-cluster > .joy-legacy-wechat-wrap .joy-legacy-wechat-popover img {
	display: block !important;
	inline-size: 180px !important;
	block-size: 180px !important;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 11px !important;
	object-fit: cover !important;
}

body.home .float-btn.joy-legacy-float-cluster > .joy-legacy-wechat-wrap.is-open .joy-legacy-wechat-popover,
html:not(.joy-has-js) body.home .float-btn.joy-legacy-float-cluster > .joy-legacy-wechat-wrap:focus-within .joy-legacy-wechat-popover {
	pointer-events: auto !important;
	opacity: 1 !important;
	visibility: visible !important;
	transform: translateX(0) scale(1) !important;
}

@media (hover: hover) and (pointer: fine) {
	html:not(.joy-has-js) body.home .float-btn.joy-legacy-float-cluster > .joy-legacy-wechat-wrap:hover .joy-legacy-wechat-popover {
		pointer-events: auto !important;
		opacity: 1 !important;
		visibility: visible !important;
		transform: translateX(0) scale(1) !important;
	}
}

@media (max-width: 1100px) {
	body.tax-product_cat [data-block-name="woocommerce/product-collection"] .wc-block-product-template.columns-4 {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

@media (max-width: 781px) {
	.joy-has-js .joy-product-category-nav__toggle {
		display: inline-flex;
	}

	.joy-product-category-nav {
		padding: 0.85rem;
		border-radius: 17px;
	}

	.joy-product-category-nav__header {
		align-items: stretch;
		flex-direction: column;
		margin-block-end: 0.65rem;
	}

	.joy-product-category-nav__title {
		font-size: 1.1rem;
	}

	body.tax-product_cat .shop-sidebar {
		position: static;
		max-block-size: none;
		overflow: visible;
	}

	body.tax-product_cat :where(h1.wp-block-query-title, main h1.wp-block-query-title) {
		font-size: clamp(2rem, 10vw, 3rem) !important;
		line-height: 1.06 !important;
	}

	.joy-contact-rail {
		inset-block-start: auto;
		inset-block-end: max(18px, calc(env(safe-area-inset-bottom) + 8px));
		inset-inline-end: max(10px, env(safe-area-inset-right));
		gap: 8px;
		transform: none;
	}

	body.home .float-btn.joy-legacy-float-cluster {
		right: max(10px, env(safe-area-inset-right)) !important;
		inset-inline-end: max(10px, env(safe-area-inset-right)) !important;
	}

	body.home .float-btn.joy-legacy-float-cluster > .joy-legacy-wechat-wrap {
		inline-size: 50px !important;
		block-size: 50px !important;
	}

	.joy-contact-rail__item,
	.joy-contact-rail__button,
	body.home .joy-legacy-float-link {
		inline-size: 50px !important;
		block-size: 50px !important;
		border-radius: 14px !important;
	}

	.joy-contact-rail__wechat-panel,
	.joy-legacy-wechat-popover {
		inset-inline-end: calc(100% + 12px);
		inline-size: min(212px, calc(100vw - 84px));
	}

	body.home .float-btn.joy-legacy-float-cluster > .joy-legacy-wechat-wrap .joy-legacy-wechat-popover {
		inline-size: min(212px, calc(100vw - 84px)) !important;
	}

	.joy-contact-rail__item--wechat:hover .joy-contact-rail__tooltip,
	.joy-contact-rail__item--wechat:focus-within .joy-contact-rail__tooltip,
	.joy-contact-rail__item--wechat.is-open .joy-contact-rail__tooltip {
		opacity: 0;
		visibility: hidden;
	}
}

@media (max-width: 599px) {
	body.tax-product_cat [data-block-name="woocommerce/product-collection"] .wc-block-product-template.columns-4 {
		grid-template-columns: minmax(0, 1fr) !important;
	}
}

@media (max-width: 360px) {
	.joy-contact-rail__wechat-panel,
	.joy-legacy-wechat-popover {
		inline-size: min(190px, calc(100vw - 84px));
	}

	.joy-contact-rail__wechat-panel img,
	.joy-legacy-wechat-popover img {
		inline-size: min(158px, 100%);
		max-inline-size: 100%;
		block-size: auto;
		aspect-ratio: 1;
	}

	body.home .float-btn.joy-legacy-float-cluster > .joy-legacy-wechat-wrap .joy-legacy-wechat-popover {
		inline-size: min(190px, calc(100vw - 84px)) !important;
	}

	body.home .float-btn.joy-legacy-float-cluster > .joy-legacy-wechat-wrap .joy-legacy-wechat-popover img {
		inline-size: min(158px, 100%) !important;
		max-inline-size: 100% !important;
		block-size: auto !important;
		aspect-ratio: 1;
	}
}

@media (prefers-reduced-motion: reduce) {
	.joy-product-category-nav__link,
	body.woocommerce-shop .shop-sidebar .wp-block-woocommerce-product-categories .wc-block-product-categories-list-item > a,
	.joy-product-category-nav__toggle,
	.joy-category-chevron,
	.joy-contact-rail__button,
	.joy-contact-rail__tooltip,
	.joy-contact-rail__wechat-panel,
	.joy-legacy-float-link,
	.joy-legacy-wechat-popover {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}

	.joy-product-category-nav__link:hover,
	body.woocommerce-shop .shop-sidebar .wp-block-woocommerce-product-categories .wc-block-product-categories-list-item > a:hover,
	.joy-contact-rail__button:hover,
	body.home .joy-legacy-float-link:hover {
		transform: none;
	}
}

@media (forced-colors: active) {
	.joy-product-category-nav,
	.joy-product-category-nav__link,
	body.woocommerce-shop .shop-sidebar .wp-block-woocommerce-product-categories,
	body.woocommerce-shop .shop-sidebar .wp-block-woocommerce-product-categories .wc-block-product-categories-list-item > a,
	.joy-contact-rail__button,
	body.home .joy-legacy-float-link {
		border: 1px solid ButtonText !important;
	}
}

@media print {
	.joy-contact-rail,
	body.home .joy-legacy-float-cluster {
		display: none !important;
	}

	.joy-product-category-nav__toggle {
		display: none !important;
	}

	.joy-product-category-nav__panel {
		display: block !important;
	}
}
