/**
 * TactNexa — Premium WooCommerce Product Category Archives
 *
 * Load after assets/css/woocommerce/shop.css.
 *
 * All rules are scoped to WooCommerce product-category archives.
 *
 * Blocksy provides:
 * - Native category H1
 * - WooCommerce category description
 *
 * category-experience.php provides:
 * - Breadcrumb
 * - Shopping guidance
 * - Dynamic category artwork
 *
 * Presentation only.
 * No product, cart, checkout or payment logic.
 */


/* =========================================================
   Category Design Tokens
   ========================================================= */

body.tax-product_cat {
	--tnx-cat-ink: #061a36;
	--tnx-cat-muted: #5c728e;
	--tnx-cat-blue: #1677ff;
	--tnx-cat-cyan: #52d7ff;
	--tnx-cat-border: #dfeaf6;
}


/* =========================================================
   Category Hero — Cinematic Background
   ========================================================= */

body.tax-product_cat .hero-section {
	position: relative;
	isolation: isolate;

	display: flex;
	align-items: center;
	justify-content: center;

	min-height: 430px;

	padding: 60px 0 64px;

	overflow: hidden;

	color: #ffffff;
	text-align: left;

	background-color: #031126 !important;

	background-image:
		linear-gradient(
			90deg,
			rgba(3, 17, 38, 0.98) 0%,
			rgba(3, 17, 38, 0.96) 36%,
			rgba(3, 17, 38, 0.60) 69%,
			rgba(3, 17, 38, 0.15) 100%
		),
		radial-gradient(
			ellipse at 86% 42%,
			rgba(22, 119, 255, 0.48),
			transparent 52%
		),
		linear-gradient(
			110deg,
			#031126 0%,
			#08264d 70%,
			#0b3871 100%
		) !important;
}


/* =========================================================
   Gaming Grid Background
   ========================================================= */

body.tax-product_cat .hero-section::before {
	content: "";

	position: absolute;
	z-index: 0;

	inset: 0;

	pointer-events: none;

	background-image:
		linear-gradient(
			rgba(79, 162, 255, 0.075) 1px,
			transparent 1px
		),
		linear-gradient(
			90deg,
			rgba(79, 162, 255, 0.075) 1px,
			transparent 1px
		);

	background-size: 44px 44px;

	-webkit-mask-image:
		linear-gradient(
			90deg,
			transparent 0%,
			#000 35%,
			#000 100%
		);

	mask-image:
		linear-gradient(
			90deg,
			transparent 0%,
			#000 35%,
			#000 100%
		);
}


/* =========================================================
   Background Energy Rings
   ========================================================= */

body.tax-product_cat .hero-section::after {
	content: "";

	position: absolute;
	z-index: 0;

	top: 50%;
	right: -150px;

	width: 560px;
	height: 560px;

	border: 1px solid rgba(82, 215, 255, 0.16);
	border-radius: 50%;

	box-shadow:
		0 0 0 65px rgba(41, 137, 255, 0.034),
		0 0 0 128px rgba(41, 137, 255, 0.021),
		inset 0 0 0 76px rgba(41, 137, 255, 0.02);

	transform: translateY(-50%);

	pointer-events: none;
}


/* =========================================================
   Blocksy Hero Content Width
   ========================================================= */

/*
 * Reserve actual horizontal space for category artwork.
 *
 * The previous design allowed the H1 and absolutely
 * positioned image to occupy the same horizontal area.
 *
 * The right padding creates a dedicated artwork column.
 */

body.tax-product_cat .hero-section > * {
	position: relative;
	z-index: 2;

	box-sizing: border-box;

	width: min(
		1240px,
		calc(100% - 96px)
	) !important;

	max-width: 1240px !important;
	min-width: 0;

	margin-inline: auto !important;

	padding:
		0
		clamp(325px, 41vw, 550px)
		0
		0 !important;

	text-align: left !important;
	align-items: flex-start !important;
}


/* =========================================================
   Blocksy Inner Header Alignment
   ========================================================= */

/*
 * Prevent a nested Blocksy header from imposing
 * a narrow, centered content column.
 */

body.tax-product_cat .hero-section :is(
	.entry-header,
	.entry-header-inner
) {
	max-width: 100% !important;

	text-align: left !important;
	align-items: flex-start !important;
}


/*
 * Anchor artwork to the full hero or its wide wrapper,
 * not to a narrower inner title element.
 */

body.tax-product_cat .hero-section :is(
	.entry-header,
	.entry-header-inner
) {
	position: static !important;
}


/* =========================================================
   Category Breadcrumb
   ========================================================= */

body.tax-product_cat .tnx-category-hero__breadcrumb {
	position: relative;
	z-index: 2;

	display: flex;
	flex-wrap: wrap;
	align-items: center;

	gap: 8px 11px;

	width: 100%;
	max-width: 100%;

	margin: 0 0 24px;

	color: #b5cde9;

	font-size: 0.78rem;
	font-weight: 600;
	line-height: 1.55;
}


body.tax-product_cat .tnx-category-hero__breadcrumb a {
	color: #e1efff;
	text-decoration: none;
}


body.tax-product_cat .tnx-category-hero__breadcrumb a:hover {
	color: var(--tnx-cat-cyan);
}


body.tax-product_cat
.tnx-category-hero__breadcrumb [aria-current="page"] {
	color: #b5cde9;
}


/* =========================================================
   Category Eyebrow
   ========================================================= */

body.tax-product_cat .tnx-category-hero__eyebrow {
	position: relative;
	z-index: 2;

	max-width: 100%;

	margin: 0 0 15px;

	color: var(--tnx-cat-cyan);

	font-size: 0.73rem;
	font-weight: 800;
	line-height: 1.5;

	letter-spacing: 0.19em;
	text-transform: uppercase;
}


/* =========================================================
   Native Category Heading
   ========================================================= */

body.tax-product_cat .hero-section :is(
	.page-title,
	.entry-title
) {
	position: relative;
	z-index: 2;

	box-sizing: border-box;

	width: 100%;
	max-width: 100%;

	margin: 0;

	color: #ffffff !important;

	font-size: clamp(2.65rem, 4.5vw, 4.35rem);
	font-weight: 850;
	line-height: 1.08;

	letter-spacing: -0.045em;

	text-align: left !important;
	text-wrap: balance;
	overflow-wrap: anywhere;

	text-shadow:
		0 7px 28px rgba(0, 0, 0, 0.16);
}


/* =========================================================
   Native Category Description
   ========================================================= */

body.tax-product_cat .hero-section :is(
	.page-description,
	.term-description,
	.taxonomy-description,
	.archive-description,
	.ct-description
) {
	position: relative;
	z-index: 2;

	box-sizing: border-box;

	width: 100%;
	max-width: 100%;

	margin: 19px 0 0;

	color: #d3e3f6;

	font-size: clamp(0.96rem, 1.25vw, 1.04rem);
	font-weight: 400;
	line-height: 1.75;

	text-align: left !important;
}


body.tax-product_cat .hero-section :is(
	.page-description,
	.term-description,
	.taxonomy-description,
	.archive-description,
	.ct-description
) p {
	margin: 0;

	color: inherit;

	font-size: inherit;
	line-height: inherit;

	text-align: left !important;
}


/* =========================================================
   Category Artwork — Right Side
   ========================================================= */

/*
 * The artwork does not occupy the text column.
 *
 * Supports:
 * - Category-specific transparent PNG
 * - WooCommerce category thumbnail
 * - Existing generic Shop fallback image
 */

body.tax-product_cat .tnx-category-hero__artwork {
	position: absolute;
	z-index: 1;

	top: 50%;
	right: -8px;

	box-sizing: border-box;

	width: min(42vw, 555px);
	height: 100%;

	margin: 0;
	padding: 12px 0;

	transform: translateY(-50%);

	pointer-events: none;
}


/* =========================================================
   Category Image
   ========================================================= */

body.tax-product_cat .tnx-category-hero__image {
	display: block;

	width: 100%;
	height: 100%;

	margin: 0;

	object-fit: contain;
	object-position: center right;

	filter:
		drop-shadow(
			0 24px 28px rgba(0, 0, 0, 0.22)
		);
}


/* =========================================================
   Standard WooCommerce Category Thumbnail
   ========================================================= */

/*
 * Category thumbnails can have white backgrounds.
 * Give these assets a clean premium image surface.
 */

body.tax-product_cat
.tnx-category-hero__artwork--thumbnail {
	top: 50%;
	right: 8px;

	width: min(35vw, 450px);
	height: 72%;

	padding: 13px;

	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 22px;

	background: rgba(255, 255, 255, 0.96);

	box-shadow:
		0 18px 55px rgba(0, 0, 0, 0.14);
}


body.tax-product_cat
.tnx-category-hero__artwork--thumbnail
.tnx-category-hero__image {
	border-radius: 12px;

	filter: none;
}


/* =========================================================
   Shopping Guidance
   ========================================================= */

/*
 * Guidance text is informative.
 * It makes no shipping, security or compatibility guarantees.
 */

body.tax-product_cat .tnx-category-hero__guidance {
	position: relative;
	z-index: 2;

	display: flex;
	flex-wrap: wrap;
	align-items: center;

	gap: 12px 20px;

	width: 100%;
	max-width: 100%;

	margin-top: 25px;
}


body.tax-product_cat .tnx-category-hero__guidance-item {
	display: inline-flex;
	align-items: center;

	gap: 8px;

	color: #eef6ff;

	font-size: 0.77rem;
	font-weight: 650;
	line-height: 1.4;
}


body.tax-product_cat .tnx-category-hero__guidance-icon {
	display: inline-grid;
	place-items: center;

	flex: 0 0 27px;

	width: 27px;
	height: 27px;

	border: 1px solid rgba(82, 215, 255, 0.36);
	border-radius: 50%;

	background: rgba(11, 111, 211, 0.28);

	color: var(--tnx-cat-cyan);

	font-size: 0.8rem;
	font-weight: 900;
}


/* =========================================================
   Category Product Listing Background
   ========================================================= */

body.tax-product_cat .site-main {
	background:
		linear-gradient(
			180deg,
			#f9fcff 0%,
			#f5f9ff 100%
		);
}


/* =========================================================
   Result Count
   ========================================================= */

body.tax-product_cat .woocommerce-result-count {
	color: #637b98;

	font-size: 0.83rem;
	font-weight: 700;
}


/* =========================================================
   Sorting
   ========================================================= */

body.tax-product_cat .woocommerce-ordering select {
	min-height: 46px;

	border: 1px solid #dbe8f5;
	border-radius: 10px;

	background-color: #ffffff;

	color: var(--tnx-cat-ink);

	box-shadow:
		0 6px 20px rgba(3, 17, 38, 0.045);
}


/* =========================================================
   Product Grid
   ========================================================= */

body.tax-product_cat ul.products {
	column-gap: 20px;
	row-gap: 24px;
}


/* =========================================================
   Product Cards
   ========================================================= */

body.tax-product_cat ul.products li.product {
	border: 1px solid var(--tnx-cat-border);
	border-radius: 18px;

	background: #ffffff;

	box-shadow:
		0 10px 34px rgba(3, 17, 38, 0.055);
}


body.tax-product_cat ul.products li.product:hover {
	border-color: rgba(22, 119, 255, 0.32);

	box-shadow:
		0 18px 44px rgba(3, 17, 38, 0.11);
}


/* =========================================================
   Real WooCommerce Sale Labels Only
   ========================================================= */

body.tax-product_cat ul.products li.product .onsale {
	border-radius: 999px;

	background: #e81947;
	color: #ffffff;

	font-size: 0.75rem;
	font-weight: 800;
}


/* =========================================================
   Product Titles
   ========================================================= */

body.tax-product_cat ul.products li.product :is(
	.woocommerce-loop-product__title,
	.ct-woo-card-title
) {
	color: var(--tnx-cat-ink);

	font-weight: 750;
}


/* =========================================================
   Product Buttons
   ========================================================= */

body.tax-product_cat ul.products li.product :is(
	.button,
	.add_to_cart_button
) {
	border-radius: 10px;

	background:
		linear-gradient(
			110deg,
			#2689ff,
			#0872f6
		);

	color: #ffffff;
}


/* =========================================================
   Tablet — Separate Text and Artwork
   ========================================================= */

@media (max-width: 1100px) {

	body.tax-product_cat .hero-section {
		min-height: 390px;

		padding: 48px 0 54px;
	}

	body.tax-product_cat .hero-section > * {
		width: calc(100% - 64px) !important;

		padding-right:
			clamp(315px, 39vw, 430px) !important;
	}

	body.tax-product_cat .hero-section :is(
		.page-title,
		.entry-title
	) {
		font-size: clamp(2.35rem, 4.7vw, 3.6rem);
	}

	body.tax-product_cat .tnx-category-hero__artwork {
		right: -15px;

		width: min(42vw, 460px);
	}

	body.tax-product_cat
	.tnx-category-hero__artwork--thumbnail {
		right: 0;

		width: min(34vw, 360px);
	}

	body.tax-product_cat .tnx-category-hero__guidance {
		gap: 11px 15px;
	}
}


/* =========================================================
   Mobile — Artwork as Background Accent
   ========================================================= */

@media (max-width: 767px) {

	body.tax-product_cat .hero-section {
		min-height: 365px;

		padding: 40px 0 45px;
	}

	body.tax-product_cat .hero-section > * {
		width: calc(100% - 36px) !important;

		padding-right: 0 !important;
	}

	body.tax-product_cat .tnx-category-hero__breadcrumb {
		gap: 6px;

		margin-bottom: 20px;

		font-size: 0.72rem;
	}

	body.tax-product_cat .tnx-category-hero__eyebrow {
		font-size: 0.68rem;
	}

	body.tax-product_cat .hero-section :is(
		.page-title,
		.entry-title
	) {
		font-size: clamp(2.25rem, 9vw, 3.2rem);
	}

	body.tax-product_cat .hero-section :is(
		.page-description,
		.term-description,
		.taxonomy-description,
		.archive-description,
		.ct-description
	) {
		font-size: 0.96rem;
	}

	body.tax-product_cat .tnx-category-hero__artwork {
		right: -26%;

		width: 106%;

		opacity: 0.14;
	}

	body.tax-product_cat
	.tnx-category-hero__artwork--thumbnail {
		right: -18%;

		width: 78%;
		height: 72%;

		padding: 0;

		border: 0;

		background: transparent;
		box-shadow: none;

		opacity: 0.09;
	}

	body.tax-product_cat .tnx-category-hero__guidance {
		gap: 10px 14px;

		margin-top: 22px;
	}

	body.tax-product_cat .tnx-category-hero__guidance-item {
		font-size: 0.74rem;
	}

	body.tax-product_cat .hero-section::after {
		right: -290px;

		opacity: 0.32;
	}
}


/* =========================================================
   Small Mobile
   ========================================================= */

@media (max-width: 420px) {

	body.tax-product_cat .hero-section {
		padding: 32px 0 38px;
	}

	body.tax-product_cat .tnx-category-hero__guidance {
		gap: 9px 11px;
	}

	body.tax-product_cat .tnx-category-hero__guidance-icon {
		flex-basis: 23px;

		width: 23px;
		height: 23px;
	}
}


/* =========================================================
   Keyboard Accessibility
   ========================================================= */

body.tax-product_cat
.tnx-category-hero__breadcrumb a:focus-visible,
body.tax-product_cat
.woocommerce-ordering select:focus-visible {
	outline: 3px solid var(--tnx-cat-cyan);
	outline-offset: 3px;
}


/* =========================================================
   Reduced Motion
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

	body.tax-product_cat ul.products li.product {
		transition: none;
	}

	body.tax-product_cat ul.products li.product:hover {
		transform: none;
	}
}