/**
 * TactNexa Homepage — Categories
 *
 * Styles only for the homepage Shop by Category section.
 * Shared homepage tokens are inherited from .tnx-home in home.css.
 */


/* =========================================================
   Categories Section
   ========================================================= */

.tnx-categories {
	position: relative;

	padding: 72px 0 78px;

	background:
		linear-gradient(
			180deg,
			#ffffff 0%,
			#f7faff 100%
		);

	border-top: 1px solid rgba(3, 17, 38, 0.06);
}


/* =========================================================
   Section Header
   ========================================================= */

.tnx-section-header {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;

	margin-bottom: 30px;
}


.tnx-section-header__content {
	max-width: 650px;
}


.tnx-section-header__eyebrow {
	margin: 0 0 9px;

	font-size: 0.74rem;
	font-weight: 800;
	line-height: 1.4;

	letter-spacing: 0.16em;
	text-transform: uppercase;

	color: var(--tnx-blue-500);
}


.tnx-section-header__title {
	margin: 0;

	font-size: clamp(1.9rem, 3vw, 2.55rem);
	font-weight: 800;
	line-height: 1.12;

	letter-spacing: -0.025em;

	color: var(--tnx-navy-950);
}


.tnx-section-header__description {
	max-width: 560px;

	margin: 11px 0 0;

	font-size: 0.98rem;
	line-height: 1.65;

	color: #60758c;
}


/* =========================================================
   Category Grid
   ========================================================= */

.tnx-category-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));

	gap: 18px;
}


/* =========================================================
   Category Card
   ========================================================= */

.tnx-category-card {
	position: relative;

	min-width: 0;

	overflow: hidden;

	border: 1px solid rgba(3, 17, 38, 0.08);
	border-radius: 16px;

	background: #ffffff;

	box-shadow:
		0 2px 5px rgba(3, 17, 38, 0.025),
		0 10px 28px rgba(3, 17, 38, 0.045);

	transition:
		transform 180ms ease,
		border-color 180ms ease,
		box-shadow 180ms ease;
}


.tnx-category-card:hover {
	transform: translateY(-4px);

	border-color: rgba(22, 119, 255, 0.22);

	box-shadow:
		0 5px 12px rgba(3, 17, 38, 0.035),
		0 18px 42px rgba(3, 17, 38, 0.085);
}


.tnx-category-card__link {
	display: grid;
	grid-template-columns: 42% 58%;

	min-height: 142px;

	color: inherit;
	text-decoration: none;
}


.tnx-category-card__link:hover {
	color: inherit;
}


.tnx-category-card__link:focus-visible {
	outline: 3px solid var(--tnx-cyan-400);
	outline-offset: -3px;
}


/* =========================================================
   Card Media
   ========================================================= */

.tnx-category-card__media {
	position: relative;

	display: flex;
	align-items: center;
	justify-content: center;

	min-width: 0;

	overflow: hidden;

	background:
		radial-gradient(
			circle at 30% 25%,
			rgba(82, 215, 255, 0.24),
			transparent 40%
		),
		linear-gradient(
			145deg,
			#eef7ff 0%,
			#e5efff 100%
		);
}


.tnx-category-card__media::after {
	content: "";

	position: absolute;

	right: -34px;
	bottom: -46px;

	width: 110px;
	height: 110px;

	border: 18px solid rgba(22, 119, 255, 0.065);
	border-radius: 50%;

	pointer-events: none;
}


/* =========================================================
   Real Category Image
   ========================================================= */

.tnx-category-card__image {
	position: relative;
	z-index: 2;

	display: block;

	width: 100%;
	height: 100%;

	padding: 14px;

	object-fit: contain;

	transition: transform 200ms ease;
}


.tnx-category-card:hover .tnx-category-card__image {
	transform: scale(1.045);
}


/* =========================================================
   Temporary No-Image Visual
   ========================================================= */

.tnx-category-card__placeholder {
	position: relative;
	z-index: 2;

	display: block;

	width: 68px;
	height: 68px;

	border-radius: 20px;

	background:
		linear-gradient(
			145deg,
			var(--tnx-blue-400) 0%,
			var(--tnx-blue-500) 48%,
			var(--tnx-navy-800) 100%
		);

	box-shadow:
		0 14px 30px rgba(22, 119, 255, 0.20),
		inset 0 1px 0 rgba(255, 255, 255, 0.20);
}


.tnx-category-card__placeholder::before,
.tnx-category-card__placeholder::after {
	content: "";

	position: absolute;
	left: 50%;
	top: 50%;

	border-radius: 999px;

	background: rgba(255, 255, 255, 0.94);

	transform: translate(-50%, -50%);
}


.tnx-category-card__placeholder::before {
	width: 30px;
	height: 7px;
}


.tnx-category-card__placeholder::after {
	width: 7px;
	height: 30px;
}


/* =========================================================
   Category-specific Subtle Accents
   ========================================================= */

.tnx-category-card--controllers .tnx-category-card__media {
	background:
		radial-gradient(
			circle at 28% 22%,
			rgba(82, 215, 255, 0.30),
			transparent 40%
		),
		linear-gradient(
			145deg,
			#eef9ff,
			#e4efff
		);
}


.tnx-category-card--charging-docks .tnx-category-card__media {
	background:
		radial-gradient(
			circle at 28% 22%,
			rgba(22, 119, 255, 0.26),
			transparent 40%
		),
		linear-gradient(
			145deg,
			#f1f6ff,
			#e7eeff
		);
}


.tnx-category-card--controller-accessories .tnx-category-card__media {
	background:
		radial-gradient(
			circle at 28% 22%,
			rgba(82, 215, 255, 0.22),
			transparent 40%
		),
		linear-gradient(
			145deg,
			#f0f9fc,
			#e5f0f8
		);
}


.tnx-category-card--gaming-setup-accessories .tnx-category-card__media {
	background:
		radial-gradient(
			circle at 28% 22%,
			rgba(47, 140, 255, 0.24),
			transparent 40%
		),
		linear-gradient(
			145deg,
			#edf5ff,
			#e6edf9
		);
}


/* =========================================================
   Card Content
   ========================================================= */

.tnx-category-card__content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;

	min-width: 0;

	padding: 20px 18px;
}


.tnx-category-card__title {
	margin: 0;

	font-size: 1rem;
	font-weight: 800;
	line-height: 1.3;

	color: var(--tnx-navy-950);
}


.tnx-category-card__cta {
	display: inline-flex;
	align-items: center;

	gap: 5px;

	margin-top: 10px;

	font-size: 0.82rem;
	font-weight: 700;
	line-height: 1.3;

	color: var(--tnx-blue-500);

	transition:
		gap 160ms ease,
		color 160ms ease;
}


.tnx-category-card:hover .tnx-category-card__cta {
	gap: 8px;

	color: #075fd7;
}


/* =========================================================
   Tablet
   ========================================================= */

@media (max-width: 1100px) {

	.tnx-categories {
		padding-top: 64px;
		padding-bottom: 68px;
	}

	.tnx-category-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.tnx-category-card__link {
		min-height: 148px;
	}
}


/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 640px) {

	.tnx-categories {
		padding-top: 52px;
		padding-bottom: 56px;
	}

	.tnx-section-header {
		margin-bottom: 24px;
	}

	.tnx-section-header__title {
		font-size: 1.85rem;
	}

	.tnx-section-header__description {
		font-size: 0.94rem;
	}

	.tnx-category-grid {
		grid-template-columns: 1fr;

		gap: 14px;
	}

	.tnx-category-card__link {
		grid-template-columns: 35% 65%;

		min-height: 116px;
	}

	.tnx-category-card__content {
		padding: 16px;
	}

	.tnx-category-card__title {
		font-size: 0.96rem;
	}

	.tnx-category-card__placeholder {
		width: 56px;
		height: 56px;

		border-radius: 17px;
	}

	.tnx-category-card__placeholder::before {
		width: 25px;
		height: 6px;
	}

	.tnx-category-card__placeholder::after {
		width: 6px;
		height: 25px;
	}
}


/* =========================================================
   Reduced Motion
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

	.tnx-category-card,
	.tnx-category-card__image,
	.tnx-category-card__cta {
		transition: none;
	}

	.tnx-category-card:hover {
		transform: none;
	}

	.tnx-category-card:hover .tnx-category-card__image {
		transform: none;
	}
}