
/**
 * TactNexa Homepage — Products
 *
 * Styles for the homepage Discover Gaming Gear section.
 * Shared design tokens are inherited from home.css.
 * Shared section headings are defined in categories.css.
 */

/* =========================================================
   Products Section
   ========================================================= */

.tnx-products {
	position: relative;

	padding: 76px 0 86px;

	background:
		linear-gradient(
			180deg,
			#ffffff 0%,
			#f8fbff 100%
		);

	border-top: 1px solid rgba(3, 17, 38, 0.06);
}


/* =========================================================
   Section Header
   ========================================================= */

.tnx-products__header {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;

	gap: 24px;

	margin-bottom: 32px;
}


/* =========================================================
   View All Products
   ========================================================= */

.tnx-products__view-all {
	display: inline-flex;
	align-items: center;
	justify-content: center;

	flex-shrink: 0;

	gap: 8px;

	padding: 10px 0;

	font-size: 0.92rem;
	font-weight: 700;
	line-height: 1.4;

	color: #075fd7;
	text-decoration: none;

	transition:
		gap 160ms ease,
		color 160ms ease;
}


.tnx-products__view-all:hover {
	gap: 12px;

	color: var(--tnx-navy-900);
}


.tnx-products__view-all:focus-visible {
	outline: 3px solid var(--tnx-blue-500);
	outline-offset: 5px;
	border-radius: 3px;
}


/* =========================================================
   Product Grid
   ========================================================= */

.tnx-product-grid {
	display: grid;

	grid-template-columns: repeat(
		4,
		minmax(0, 1fr)
	);

	gap: 22px;

	align-items: stretch;
}


/* =========================================================
   Product Card
   ========================================================= */

.tnx-product-card {
	position: relative;

	display: flex;
	flex-direction: column;

	min-width: 0;

	overflow: hidden;

	border: 1px solid rgba(3, 17, 38, 0.09);
	border-radius: 16px;

	background: #ffffff;

	box-shadow:
		0 2px 6px rgba(3, 17, 38, 0.025),
		0 10px 30px rgba(3, 17, 38, 0.045);

	transition:
		transform 180ms ease,
		border-color 180ms ease,
		box-shadow 180ms ease;
}


.tnx-product-card:hover {
	transform: translateY(-5px);

	border-color: rgba(22, 119, 255, 0.25);

	box-shadow:
		0 6px 16px rgba(3, 17, 38, 0.045),
		0 20px 45px rgba(3, 17, 38, 0.10);
}


.tnx-product-card:focus-within {
	border-color: var(--tnx-blue-500);
}


/* =========================================================
   Product Link
   ========================================================= */

.tnx-product-card__link {
	display: flex;
	flex-direction: column;

	width: 100%;
	height: 100%;

	color: inherit;
	text-decoration: none;
}


.tnx-product-card__link:hover {
	color: inherit;
}


.tnx-product-card__link:focus-visible {
	outline: 3px solid var(--tnx-blue-500);
	outline-offset: -3px;
}


/* =========================================================
   Product Media
   ========================================================= */

.tnx-product-card__media {
	position: relative;

	display: flex;
	align-items: center;
	justify-content: center;

	width: 100%;
	aspect-ratio: 1 / 1;

	overflow: hidden;

	background:
		radial-gradient(
			circle at 50% 35%,
			rgba(82, 215, 255, 0.10),
			transparent 65%
		),
		linear-gradient(
			145deg,
			#f8fbff 0%,
			#eef4fc 100%
		);

	border-bottom: 1px solid rgba(3, 17, 38, 0.045);
}


/* =========================================================
   WooCommerce Product Image
   ========================================================= */

.tnx-product-card__image {
	position: relative;
	z-index: 1;

	display: block;

	width: 100%;
	height: 100%;

	margin: 0;
	padding: 22px;

	box-sizing: border-box;

	object-fit: contain;
	object-position: center;

	transition: transform 220ms ease;
}


.tnx-product-card:hover .tnx-product-card__image {
	transform: scale(1.055);
}


/* =========================================================
   Stock Badge
   ========================================================= */

.tnx-product-card__stock {
	position: absolute;
	z-index: 3;

	top: 14px;
	left: 14px;

	display: inline-flex;
	align-items: center;

	padding: 7px 11px;

	border: 1px solid rgba(153, 27, 27, 0.12);
	border-radius: 6px;

	background: #fff1f2;

	font-size: 0.72rem;
	font-weight: 800;
	line-height: 1.2;

	color: #9f1239;
}


/* =========================================================
   Product Content
   ========================================================= */

.tnx-product-card__content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;

	flex: 1;

	min-width: 0;

	padding: 20px;
}


/* =========================================================
   Product Title
   ========================================================= */

.tnx-product-card__title {
	margin: 0;

	font-size: 0.96rem;
	font-weight: 750;
	line-height: 1.5;

	letter-spacing: -0.01em;

	color: var(--tnx-navy-950);

	overflow-wrap: anywhere;

	transition: color 160ms ease;
}


.tnx-product-card:hover .tnx-product-card__title {
	color: #075fd7;
}


/* =========================================================
   Product Price
   ========================================================= */

.tnx-product-card__price {
	width: 100%;

	margin-top: auto;
	padding-top: 18px;

	font-size: 1.18rem;
	font-weight: 800;
	line-height: 1.4;

	color: var(--tnx-navy-950);
}


.tnx-product-card__price .amount {
	color: inherit;
	font-weight: inherit;
}


.tnx-product-card__price del {
	margin-right: 5px;

	font-size: 0.83rem;
	font-weight: 500;

	color: #64748b;
}


.tnx-product-card__price del .amount {
	color: inherit;
	font-weight: inherit;
}


.tnx-product-card__price ins {
	font-weight: 800;

	color: #075fd7;
	text-decoration: none;
}


.tnx-product-card__price ins .amount {
	color: inherit;
}


/* =========================================================
   Product CTA
   ========================================================= */

.tnx-product-card__cta {
	display: inline-flex;
	align-items: center;

	gap: 7px;

	margin-top: 16px;

	font-size: 0.83rem;
	font-weight: 800;
	line-height: 1.4;

	color: #075fd7;

	transition:
		gap 160ms ease,
		color 160ms ease;
}


.tnx-product-card:hover .tnx-product-card__cta {
	gap: 11px;

	color: var(--tnx-navy-900);
}


/* =========================================================
   Large Tablet
   ========================================================= */

@media (max-width: 1100px) {

	.tnx-products {
		padding-top: 68px;
		padding-bottom: 76px;
	}

	.tnx-product-grid {
		grid-template-columns: repeat(
			2,
			minmax(0, 1fr)
		);

		gap: 20px;
	}

	.tnx-product-card__image {
		padding: 28px;
	}
}


/* =========================================================
   Tablet / Small Screens
   ========================================================= */

@media (max-width: 767px) {

	.tnx-products {
		padding-top: 58px;
		padding-bottom: 64px;
	}

	.tnx-products__header {
		align-items: flex-start;
		flex-direction: column;

		gap: 14px;

		margin-bottom: 26px;
	}

	.tnx-products__view-all {
		padding: 4px 0;
	}

	.tnx-product-grid {
		gap: 16px;
	}

	.tnx-product-card__content {
		padding: 18px;
	}
}


/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 600px) {

	.tnx-products {
		padding-top: 52px;
		padding-bottom: 58px;
	}

	.tnx-product-grid {
		grid-template-columns: minmax(0, 1fr);

		gap: 18px;
	}

	.tnx-product-card__media {
		aspect-ratio: 4 / 3;
	}

	.tnx-product-card__image {
		padding: 24px;
	}

	.tnx-product-card__content {
		padding: 20px;
	}

	.tnx-product-card__title {
		font-size: 1rem;
	}

	.tnx-product-card__price {
		font-size: 1.2rem;
	}

	.tnx-product-card__cta {
		margin-top: 14px;
	}
}


/* =========================================================
   Reduced Motion
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

	.tnx-product-card,
	.tnx-product-card__image,
	.tnx-product-card__title,
	.tnx-product-card__cta,
	.tnx-products__view-all {
		transition: none;
	}

	.tnx-product-card:hover {
		transform: none;
	}

	.tnx-product-card:hover .tnx-product-card__image {
		transform: none;
	}
}
