.tax-product_cat .wd-page-title {
	position: relative;
	min-height: clamp(290px, 32vw, 448px);
	display: flex;
	align-items: center;
	overflow: hidden;
}

.tax-product_cat .wd-page-title .wd-page-title-bg {
	background-position: center center !important;
	background-size: cover !important;
	background-repeat: no-repeat !important;
}

.tax-product_cat .wd-page-title .wd-page-title-bg img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
}

.tax-product_cat .wd-page-title .wd-page-title-bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .52);
}

:is(body.woocommerce-shop, body.post-type-archive-product) .wd-page-title {
	position: relative;
	overflow: hidden;
}

:is(body.woocommerce-shop, body.post-type-archive-product) .wd-page-title .wd-page-title-bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .52);
}

:is(body.woocommerce-shop, body.post-type-archive-product) .wd-page-title .container {
	position: relative;
	z-index: 2;
}

:is(body.woocommerce-shop, body.post-type-archive-product) .wd-page-title :is(.entry-title, .woocommerce-breadcrumb, .woocommerce-breadcrumb a) {
	color: #fff;
}

.tax-product_cat .wd-page-title .container {
	position: relative;
	z-index: 2;
	text-align: left;
}

.tax-product_cat .wd-page-title .wd-title-wrapp {
	position: relative;
	display: block;
}

.tax-product_cat .wd-page-title .wd-back-btn {
	display: none !important;
}

.tax-product_cat .wd-page-title .entry-title,
.tax-product_cat .wd-page-title .gifts-category-hero-description,
.tax-product_cat .wd-page-title .gifts-category-hero-description a {
	color: #fff;
}

.tax-product_cat .wd-page-title .entry-title {
	max-width: 760px;
	margin-bottom: 0;
	font-size: clamp(28px, 3.2vw, 46px);
	line-height: 1.05;
	text-shadow: 0 2px 18px rgba(0, 0, 0, .24);
}

.gifts-category-hero-description {
	max-width: 720px;
	margin-top: 14px;
	font-size: clamp(14px, 1.3vw, 16px);
	line-height: 1.65;
}

.gifts-category-hero-description > :last-child {
	margin-bottom: 0;
}

.gifts-subcategory-navigation {
	margin: 28px 0 38px;
	padding: clamp(22px, 3vw, 36px);
	border: 1px solid rgba(31, 31, 31, .08);
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 12px 40px rgba(31, 25, 20, .06);
}

.gifts-subcategory-heading {
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 24px;
}

.gifts-subcategory-heading h2,
.gifts-subcategory-heading p {
	margin: 0;
}

.gifts-subcategory-heading h2 {
	font-size: clamp(24px, 2.4vw, 34px);
}

.gifts-subcategory-heading p {
	color: #777;
}

.gifts-subcategory-list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
	gap: clamp(16px, 2vw, 26px);
}

.gifts-subcategory-card {
	display: flex;
	min-width: 0;
	align-items: center;
	flex-direction: column;
	text-align: center;
	color: inherit;
}

.gifts-subcategory-image {
	display: block;
	width: clamp(92px, 8vw, 118px);
	aspect-ratio: 1;
	margin-bottom: 14px;
	border-radius: 50%;
	overflow: hidden;
	background: #f5f2ee;
	box-shadow: 0 8px 24px rgba(35, 29, 25, .1);
	transition: transform .25s ease, box-shadow .25s ease;
}

.gifts-subcategory-image img,
.gifts-subcategory-placeholder {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.gifts-subcategory-card:hover .gifts-subcategory-image {
	transform: translateY(-4px);
	box-shadow: 0 14px 30px rgba(35, 29, 25, .16);
}

.gifts-subcategory-card strong {
	font-size: 16px;
	line-height: 1.3;
}

.gifts-subcategory-card small {
	margin-top: 4px;
	color: #888;
}

/* Keep every catalogue card aligned without cropping personalised product artwork. */
:is(body.tax-product_cat, body.woocommerce-shop, body.post-type-archive-product) .products:not(.wd-products-list) .wd-product .wd-product-thumb {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #f8f8f8;
}

:is(body.tax-product_cat, body.woocommerce-shop, body.post-type-archive-product) .products:not(.wd-products-list) .wd-product .wd-product-img-link,
:is(body.tax-product_cat, body.woocommerce-shop, body.post-type-archive-product) .products:not(.wd-products-list) .wd-product .wd-product-img-hover {
	width: 100%;
	height: 100%;
}

:is(body.tax-product_cat, body.woocommerce-shop, body.post-type-archive-product) .products:not(.wd-products-list) .wd-product .wd-product-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
}

/* Context-aware category and WooCommerce layered filters. */
.gifts-sidebar-categories .gifts-sidebar-category-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.gifts-sidebar-category-list li {
	margin: 0;
	border-bottom: 1px solid rgba(0, 0, 0, .08);
}

.gifts-sidebar-category-list li:last-child {
	border-bottom: 0;
}

.gifts-sidebar-category-list a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 0;
	color: inherit;
}

.gifts-sidebar-category-list small {
	color: #999;
	font-size: 12px;
}

.gifts-sidebar-category-list .is-current > a {
	color: var(--wd-primary-color);
	font-weight: 600;
}

.gifts-custom-attribute-group {
	margin-top: 18px;
	padding-top: 18px;
	border-top: 1px solid rgba(0, 0, 0, .08);
}

.gifts-custom-attribute-group:first-of-type {
	margin-top: 0;
	padding-top: 0;
	border-top: 0;
}

.gifts-custom-attribute-title {
	margin-bottom: 10px;
	font-size: 14px;
	font-weight: 600;
	text-transform: none;
}

.gifts-custom-attribute-widget .woocommerce-widget-layered-nav-list {
	margin-bottom: 0;
}

.gifts-clear-custom-attributes {
	display: inline-flex;
	margin-top: 18px;
	color: var(--wd-primary-color);
	font-size: 13px;
	font-weight: 600;
}

@media (max-width: 767px) {
	.tax-product_cat .wd-page-title {
		min-height: 336px;
	}

	.tax-product_cat .wd-page-title .wd-page-title-bg::after {
		background: rgba(0, 0, 0, .58);
	}

	:is(body.woocommerce-shop, body.post-type-archive-product) .wd-page-title .wd-page-title-bg::after {
		background: rgba(0, 0, 0, .58);
	}

	.gifts-subcategory-heading {
		align-items: flex-start;
		flex-direction: column;
		gap: 5px;
	}

	.gifts-subcategory-list {
		display: flex;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		padding: 4px 2px 12px;
	}

	.gifts-subcategory-card {
		flex: 0 0 138px;
		scroll-snap-align: start;
	}
}
