/*
AiST TECH Main Product Section
Compatibility Fix

Preserved:
- Fixed desktop header
- Existing GNB hover dropdown
- Existing fullPage section behavior
- Existing right-side MAIN / PRODUCT / CUSTOMER / GLOBAL navigation
- Existing TweenMax .resbox entrance animation
*/

#section2.product-showcase-section,
#section2.product-showcase-section * {
	box-sizing: border-box;
}

#section2.product-showcase-section {
	position: relative;
	overflow: hidden;
	--product-header-safe: 145px;
	--product-right-safe: 118px;
}

#section2.product-showcase-section > .fp-tableCell {
	display: table-cell;
	width: 100%;
	height: 100%;
	vertical-align: top;
}

#section2.product-showcase-section .mainCon1 {
	position: relative;
	width: 100%;
	height: 100%;
	overflow: hidden;
}

#section2.product-showcase-section .txtDiv,
#section2.product-showcase-section .product-showcase-inner {
	width: 100%;
	max-width: 100%;
	height: 100%;
	margin: 0;
	overflow: hidden;
}

#section2.product-showcase-section .product-showcase-box {
	display: flex;
	position: relative;
	top: 0;
	left: 0;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	width: 100%;
	max-width: 100%;
	height: 100%;
	margin: 0;
	padding:
		var(--product-header-safe)
		var(--product-right-safe)
		20px
		28px;
	overflow: hidden;
	color: #fff;
	text-align: center;
}

/* Heading */
#section2 .product-showcase-heading {
	flex: 0 0 auto;
	margin: 0 0 24px;
	text-align: center;
}

#section2 .product-showcase-kicker {
	margin: 0 0 12px;
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 7px;
	color: #4faeff;
}

#section2 .product-showcase-heading h2 {
	margin: 0;
	font-size: clamp(34px, 2.55vw, 48px);
	font-weight: 700;
	line-height: 1.18;
	letter-spacing: -2px;
	color: #fff;
}

#section2 .product-showcase-heading p {
	margin: 10px 0 0;
	font-size: 15px;
	font-weight: 300;
	line-height: 1.55;
	letter-spacing: -0.3px;
	color: rgba(255,255,255,0.80);
}

/* Grid */
#section2 .product-showcase-grid {
	display: grid;
	flex: 0 0 auto;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 10px;
	width: min(
		1400px,
		calc(100vw - var(--product-right-safe) - 56px)
	);
	max-width: calc(
		100vw - var(--product-right-safe) - 56px
	);
	min-width: 0;
	margin: 0 auto;
	padding: 0;
	overflow: visible;
	background: transparent;
}

/* Cards */
#section2 .product-showcase-card {
	position: relative;
	float: none;
	width: 100%;
	min-width: 0;
	height: clamp(390px, calc(100vh - 370px), 600px);
	margin: 0;
	overflow: hidden;
	border: 1px solid rgba(102, 157, 203, 0.30);
	background: rgba(3, 11, 23, 0.93);
	transition:
		transform 0.25s ease,
		border-color 0.25s ease,
		box-shadow 0.25s ease;
}

#section2 .product-showcase-card:hover {
	z-index: 3;
	border-color: rgba(74, 171, 255, 0.78);
	box-shadow: 0 18px 42px rgba(0,0,0,0.34);
	transform: translateY(-5px);
}

#section2 .product-showcase-card > a {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	background:
		linear-gradient(
			180deg,
			rgba(8, 19, 35, 0.12) 0%,
			rgba(4, 11, 22, 0.96) 100%
		) !important;
	color: #fff;
}

/* Images */
#section2 .product-showcase-image {
	position: relative;
	flex: 0 0 54%;
	width: 100%;
	min-height: 0;
	overflow: hidden;
	background: #07111f;
}

#section2 .product-showcase-image::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	height: 24%;
	background:
		linear-gradient(
			180deg,
			rgba(3,10,20,0) 0%,
			rgba(3,10,20,0.50) 100%
		);
	pointer-events: none;
}

#section2 .product-showcase-image img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center center;
	transition: transform 0.45s ease;
}

#section2 .product-showcase-card:hover .product-showcase-image img {
	transform: scale(1.035);
}

/* Text area */
#section2 .product-showcase-content {
	display: flex;
	position: static;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: flex-start;
	width: 100%;
	min-height: 0;
	padding: 22px 24px 24px;
	color: #fff;
	text-align: left;
	letter-spacing: 0;
}

#section2 .product-showcase-category {
	margin: 0 0 10px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: 0.5px;
	color: #43a9ff;
	text-transform: uppercase;
}

#section2 .product-showcase-name {
	margin: 0;
	padding: 0;
	font-size: clamp(25px, 2vw, 31px);
	font-weight: 700;
	line-height: 1.12;
	letter-spacing: -1px;
	color: #fff;
	text-transform: uppercase;
}

#section2 .product-showcase-name p {
	margin: 0;
}

#section2 .product-showcase-name::after {
	content: "";
	display: block;
	width: 32px;
	height: 1px;
	margin: 12px 0 0;
	background: rgba(255,255,255,0.58);
}

#section2 .product-showcase-description {
	margin: 12px 0 0;
	padding: 0;
	font-size: 13px;
	font-weight: 300;
	line-height: 1.65;
	letter-spacing: -0.25px;
	color: rgba(255,255,255,0.83);
	word-break: keep-all;
}

#section2 .product-showcase-link {
	display: flex;
	align-items: center;
	gap: 11px;
	margin: auto 0 0;
	padding: 13px 0 0;
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.3px;
	color: #42a9ff;
}

#section2 .product-showcase-arrow {
	display: inline-block;
	font-size: 19px;
	font-weight: 300;
	line-height: 1;
	transition: transform 0.22s ease;
}

#section2 .product-showcase-card:hover .product-showcase-arrow {
	transform: translateX(4px);
}

/* Overview button */
#section2 .product-showcase-overview {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	gap: 18px;
	min-width: 230px;
	height: 44px;
	margin: 18px auto 0;
	padding: 0 23px;
	border: 1px solid rgba(63, 166, 255, 0.65);
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.4px;
	color: #4babff;
	background: rgba(1, 9, 20, 0.46);
	transition:
		color 0.22s ease,
		background 0.22s ease,
		border-color 0.22s ease;
}

#section2 .product-showcase-overview:hover {
	color: #fff;
	border-color: #4babff;
	background: rgba(31, 116, 190, 0.22);
}

/*
Short desktop windows:
Do not create an inner scrollbar.
Compact only the Product section so the fullPage section remains intact.
*/
@media only screen and (min-width: 801px) and (max-height: 820px) {
	#section2.product-showcase-section {
		--product-header-safe: 137px;
	}

	#section2 .product-showcase-box {
		padding-bottom: 12px;
	}

	#section2 .product-showcase-heading {
		margin-bottom: 16px;
	}

	#section2 .product-showcase-kicker {
		margin-bottom: 9px;
		font-size: 11px;
		letter-spacing: 6px;
	}

	#section2 .product-showcase-heading h2 {
		font-size: clamp(31px, 2.2vw, 40px);
	}

	#section2 .product-showcase-heading p {
		margin-top: 7px;
		font-size: 13px;
		line-height: 1.4;
	}

	#section2 .product-showcase-card {
		height: clamp(330px, calc(100vh - 315px), 470px);
	}

	#section2 .product-showcase-image {
		flex-basis: 52%;
	}

	#section2 .product-showcase-content {
		padding: 17px 19px 18px;
	}

	#section2 .product-showcase-category {
		margin-bottom: 7px;
		font-size: 10px;
	}

	#section2 .product-showcase-name {
		font-size: clamp(22px, 1.75vw, 27px);
	}

	#section2 .product-showcase-name::after {
		margin-top: 9px;
	}

	#section2 .product-showcase-description {
		margin-top: 9px;
		font-size: 11.5px;
		line-height: 1.48;
	}

	#section2 .product-showcase-link {
		padding-top: 8px;
		font-size: 11px;
	}

	#section2 .product-showcase-overview {
		height: 38px;
		margin-top: 12px;
	}
}

/* Extra-short desktop */
@media only screen and (min-width: 801px) and (max-height: 680px) {
	#section2.product-showcase-section {
		--product-header-safe: 128px;
	}

	#section2 .product-showcase-heading {
		margin-bottom: 11px;
	}

	#section2 .product-showcase-kicker {
		margin-bottom: 7px;
		font-size: 10px;
	}

	#section2 .product-showcase-heading h2 {
		font-size: 29px;
	}

	#section2 .product-showcase-heading p {
		margin-top: 5px;
		font-size: 12px;
	}

	#section2 .product-showcase-card {
		height: clamp(300px, calc(100vh - 285px), 390px);
	}

	#section2 .product-showcase-content {
		padding: 13px 16px 14px;
	}

	#section2 .product-showcase-description {
		font-size: 10.5px;
		line-height: 1.4;
	}

	#section2 .product-showcase-overview {
		min-width: 210px;
		height: 34px;
		margin-top: 8px;
		font-size: 11px;
	}
}

/* Medium-width desktop: preserve four cards and the right fullPage menu. */
@media only screen and (min-width: 801px) and (max-width: 1280px) {
	#section2.product-showcase-section {
		--product-right-safe: 104px;
	}

	#section2 .product-showcase-box {
		padding-left: 18px;
	}

	#section2 .product-showcase-grid {
		gap: 7px;
	}

	#section2 .product-showcase-content {
		padding-right: 16px;
		padding-left: 16px;
	}

	#section2 .product-showcase-category {
		font-size: 10px;
	}

	#section2 .product-showcase-name {
		font-size: 24px;
	}

	#section2 .product-showcase-description {
		font-size: 11.5px;
	}
}

/*
Responsive/mobile mode:
Keep the site's existing mobile header, hamburger menu, normal page scrolling,
and other fullPage behavior. Only isolate the PRODUCT section layout.
*/
@media only screen and (max-width: 800px) {
	/*
	The legacy main.css adds 20px padding to .section2 .mainSection.
	Remove it only inside the redesigned PRODUCT section.
	*/
	#section2.product-showcase-section,
	#section2.product-showcase-section .mainSection,
	#section2.product-showcase-section .txtDiv,
	#section2.product-showcase-section .product-showcase-inner,
	#section2.product-showcase-section .product-showcase-box {
		width: 100% !important;
		max-width: 100% !important;
		min-width: 0 !important;
		margin-right: 0 !important;
		margin-left: 0 !important;
		box-sizing: border-box !important;
	}

	#section2.product-showcase-section {
		--product-header-safe: 48px;
		--product-right-safe: 0px;
		height: auto !important;
		min-height: 0 !important;
		overflow-x: hidden !important;
		overflow-y: visible !important;
	}

	#section2.product-showcase-section > .fp-tableCell,
	#section2.product-showcase-section .mainSection,
	#section2.product-showcase-section .txtDiv,
	#section2.product-showcase-section .product-showcase-inner,
	#section2.product-showcase-section .product-showcase-box {
		display: block !important;
		height: auto !important;
		min-height: 0 !important;
		overflow: visible !important;
	}

	#section2.product-showcase-section .mainSection {
		padding: 0 !important;
	}

	#section2 .product-showcase-box {
		padding:
			var(--product-header-safe)
			12px
			58px !important;
		overflow-x: hidden !important;
	}

	#section2 .product-showcase-heading {
		width: 100%;
		max-width: 100%;
		margin: 0 0 27px;
		padding: 0 6px;
	}

	#section2 .product-showcase-kicker {
		margin-bottom: 11px;
		font-size: 11px;
		letter-spacing: 5px;
	}

	#section2 .product-showcase-heading h2 {
		max-width: 100%;
		margin-right: auto;
		margin-left: auto;
		font-size: clamp(28px, 8vw, 34px);
		line-height: 1.25;
		letter-spacing: -1.4px;
		white-space: normal;
		word-break: keep-all;
	}

	#section2 .product-showcase-heading p {
		max-width: 330px;
		margin: 13px auto 0;
		font-size: 14px;
		line-height: 1.55;
		word-break: keep-all;
	}

	/*
	Use the parent's content width instead of 100vw.
	This prevents the 20px legacy padding and mobile scrollbar width
	from making the card wider than the visible section.
	*/
	#section2 .product-showcase-grid {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr) !important;
		gap: 15px;
		width: 100% !important;
		max-width: 430px !important;
		min-width: 0 !important;
		margin: 0 auto !important;
		padding: 0 !important;
		overflow: visible !important;
	}

	#section2 .product-showcase-card,
	#section2 .product-showcase-card > a,
	#section2 .product-showcase-image,
	#section2 .product-showcase-content {
		width: 100% !important;
		max-width: 100% !important;
		min-width: 0 !important;
		margin-right: 0 !important;
		margin-left: 0 !important;
	}

	#section2 .product-showcase-card,
	#section2 .product-showcase-card > a {
		height: auto !important;
		min-height: 0 !important;
	}

	#section2 .product-showcase-card {
		float: none !important;
		transform: none;
	}

	#section2 .product-showcase-card:hover {
		transform: none;
	}

	#section2 .product-showcase-image {
		flex: none;
		height: auto !important;
		aspect-ratio: 4 / 3;
	}

	#section2 .product-showcase-image img {
		width: 100% !important;
		height: 100% !important;
		object-fit: cover;
		object-position: center center;
	}

	#section2 .product-showcase-content {
		min-height: 220px;
		padding: 22px 21px 24px;
		overflow: hidden;
	}

	#section2 .product-showcase-category {
		font-size: 12px;
	}

	#section2 .product-showcase-name {
		max-width: 100%;
		font-size: clamp(26px, 8vw, 30px);
		line-height: 1.15;
		white-space: normal;
		overflow-wrap: break-word;
	}

	#section2 .product-showcase-description {
		max-width: 100%;
		font-size: 13px;
		line-height: 1.65;
		word-break: keep-all;
		overflow-wrap: break-word;
	}

	#section2 .product-showcase-overview {
		width: min(280px, 100%);
		max-width: 100%;
		margin-top: 27px;
	}
}

@media only screen and (max-width: 390px) {
	#section2 .product-showcase-box {
		padding-right: 8px !important;
		padding-left: 8px !important;
	}

	#section2 .product-showcase-heading {
		padding-right: 4px;
		padding-left: 4px;
	}

	#section2 .product-showcase-grid {
		max-width: 100% !important;
	}

	#section2 .product-showcase-content {
		padding-right: 18px;
		padding-left: 18px;
	}
}
