/**
 * N2N-AFE — Products archive & single (san-pham) redesign.
 */

/* ── Hero ── */
.n2n-products-hero {
	position: relative;
	padding: 48px 0 56px;
	overflow: hidden;
}

.n2n-products-hero__bg {
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, #071a2e 0%, #004e97 58%, #0066c4 100%);
}

.n2n-products-hero__bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		radial-gradient(circle at 85% 20%, rgba(240, 208, 96, 0.18), transparent 42%),
		linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.18) 100%);
}

.n2n-products-hero__inner {
	position: relative;
	z-index: 2;
}

.n2n-products-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-bottom: 14px;
	font-size: 14px;
}

.n2n-products-breadcrumb a {
	color: rgba(255, 255, 255, 0.82);
	text-decoration: none;
}

.n2n-products-breadcrumb a:hover {
	color: #f0d060;
}

.n2n-products-breadcrumb span:not(.n2n-products-breadcrumb__current) {
	color: rgba(255, 255, 255, 0.45);
}

.n2n-products-breadcrumb__current {
	color: #ffffff;
	font-weight: 600;
}

.n2n-products-hero__title {
	margin: 0;
	color: #ffffff;
	font-size: clamp(30px, 4vw, 44px);
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -0.02em;
}

.n2n-products-hero__subtitle {
	max-width: 720px;
	margin: 14px 0 0;
	color: rgba(255, 255, 255, 0.86);
	font-size: 18px;
	line-height: 1.65;
}

/* ── Archive page ── */
.n2n-products-page {
	background: var(--n2n-bg, #f4f7fb);
}

.n2n-products-page__body {
	padding: 40px 0 72px;
}

.n2n-products-intro {
	max-width: 760px;
	margin: 0 auto 36px;
	text-align: center;
	color: var(--n2n-muted, #64748b);
	font-size: 17px;
	line-height: 1.7;
}

/* Product grid cards */
.n2n-products-page .n2n-product-list,
.n2n-products-page .product-list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 22px;
	padding: 0;
}

@media (max-width: 1099px) {
	.n2n-products-page .n2n-product-list,
	.n2n-products-page .product-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.n2n-products-page .n2n-product-list,
	.n2n-products-page .product-list {
		grid-template-columns: 1fr;
	}
}

.n2n-products-page .n2n-product-card,
.n2n-products-page .item-product {
	margin: 0 !important;
}

/* Override legacy horizontal 50/50 layout from style.css */
.n2n-products-page .n2n-product-card a,
.n2n-products-page .item-product a {
	display: flex !important;
	flex-direction: column !important;
	flex-wrap: nowrap !important;
	align-items: stretch !important;
	height: 100%;
	overflow: hidden;
	border-radius: 16px;
	background: #ffffff;
	border: 1px solid rgba(0, 78, 151, 0.08);
	box-shadow: 0 8px 24px rgba(10, 37, 64, 0.07);
	text-decoration: none;
	transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.n2n-products-page .item-product:nth-child(even) a {
	flex-direction: column !important;
}

.n2n-products-page .n2n-product-card a:hover,
.n2n-products-page .item-product a:hover {
	transform: translateY(-4px);
	border-color: rgba(0, 78, 151, 0.2);
	box-shadow: 0 14px 36px rgba(0, 78, 151, 0.12);
}

/* Uniform image frame */
.n2n-products-page .prodct-thumb,
.n2n-products-page .n2n-product-card__media {
	flex: 0 0 auto !important;
	width: 100% !important;
	max-width: 100% !important;
	height: 190px;
	min-height: 190px;
	max-height: 190px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 14px 18px;
	background: linear-gradient(180deg, #eef4fb 0%, #f8fbff 100%);
	border-bottom: 1px solid rgba(0, 78, 151, 0.06);
}

.n2n-products-page .prodct-thumb img,
.n2n-products-page .n2n-product-card__media img {
	display: block;
	width: auto !important;
	max-width: 100% !important;
	height: auto !important;
	max-height: 162px !important;
	object-fit: contain !important;
	object-position: center center;
	transition: transform 0.35s ease;
}

.n2n-products-page .item-product a:hover img {
	transform: scale(1.03);
}

.n2n-products-page .product-content,
.n2n-products-page .n2n-product-card__body {
	flex: 1 1 auto !important;
	width: 100% !important;
	max-width: 100% !important;
	display: flex;
	flex-direction: column;
	padding: 18px 20px 20px;
}

.n2n-products-page .product-content h4,
.n2n-products-page .n2n-product-card__title {
	margin: 0 0 8px;
	color: #0a2540;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.35;
	min-height: 2.7em;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.n2n-products-page .product-content p,
.n2n-products-page .n2n-product-card__excerpt {
	margin: 0 0 14px;
	color: #64748b;
	font-size: 14px;
	line-height: 1.6;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.n2n-products-page .product-content span,
.n2n-products-page .n2n-product-card__cta {
	margin-top: auto;
	align-self: flex-start;
	padding: 9px 18px;
	border-radius: 999px;
	border: none;
	background: linear-gradient(135deg, #004e97, #0066c4);
	color: #ffffff !important;
	font-size: 14px;
	font-weight: 600;
	transition: background 0.2s ease, transform 0.2s ease;
}

.n2n-products-page .item-product a:hover span,
.n2n-products-page .n2n-product-card a:hover .n2n-product-card__cta {
	background: #0a2540;
	transform: translateX(2px);
}

.n2n-reveal-item {
	opacity: 0;
	transform: translateY(18px);
	transition: opacity 0.55s ease, transform 0.55s ease;
}

.n2n-reveal-item.is-visible {
	opacity: 1;
	transform: translateY(0);
}

/* ── Single product ── */
.n2n-product-single {
	background: var(--n2n-bg, #f4f7fb);
}

.n2n-product-single .title-page {
	display: none;
}

.n2n-product-single__body {
	padding: 40px 0 72px;
}

.n2n-product-single .content-single {
	padding: 0;
}

.n2n-product-single .content-single > .row {
	padding: 28px;
	border-radius: 20px;
	background: #ffffff;
	border: 1px solid rgba(0, 78, 151, 0.08);
	box-shadow: 0 12px 36px rgba(10, 37, 64, 0.08);
}

.n2n-product-single .content-single h2 {
	margin-top: 0;
	color: #0a2540;
	font-size: clamp(24px, 3vw, 32px);
	font-weight: 800;
	line-height: 1.25;
}

.n2n-product-single .content-single p {
	color: #475569;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.75;
}

.n2n-product-single .content-single img.w-100 {
	border-radius: 14px;
	box-shadow: 0 8px 28px rgba(10, 37, 64, 0.12);
}

.n2n-product-single .tabs-bg {
	margin-top: 28px;
	padding: 28px;
	border-radius: 20px;
	background: #ffffff !important;
	border: 1px solid rgba(0, 78, 151, 0.08);
	box-shadow: 0 12px 36px rgba(10, 37, 64, 0.08);
}

.n2n-product-single .nav-tabs-custom.n2n-product-tabs {
	display: flex !important;
	justify-content: center;
	gap: 8px;
	margin-bottom: 28px;
	border-bottom: none;
}

.n2n-product-single .nav-tabs-custom.n2n-product-tabs li {
	margin: 0;
}

.n2n-product-single .nav-tabs-custom.n2n-product-tabs a {
	padding: 12px 22px;
	border-radius: 999px;
	background: #e8f2fa;
	color: #004e97 !important;
	opacity: 1 !important;
	font-size: 15px !important;
	font-weight: 600;
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease;
}

.n2n-product-single .nav-tabs-custom.n2n-product-tabs li.active a,
.n2n-product-single .nav-tabs-custom.n2n-product-tabs li:hover a {
	background: linear-gradient(135deg, #004e97, #0066c4);
	color: #ffffff !important;
}

.n2n-product-single .tab-panels .panel {
	display: none;
}

.n2n-product-single .tab-panels .panel.active {
	display: block;
}

.n2n-product-single .tab-panels .row {
	align-items: center;
}

.n2n-product-single .services-bg {
	position: relative;
	margin-top: 36px;
	padding: 48px 28px;
	border-radius: 20px;
	overflow: hidden;
	background: linear-gradient(135deg, #071a2e 0%, #0a2540 100%) !important;
	background-attachment: scroll !important;
}

.n2n-product-single .services-bg::before {
	content: "";
	position: absolute;
	inset: 0;
	background:
		radial-gradient(circle at 20% 20%, rgba(0, 102, 196, 0.35), transparent 45%),
		radial-gradient(circle at 80% 80%, rgba(240, 208, 96, 0.12), transparent 40%);
	pointer-events: none;
}

.n2n-product-single .services-bg > .row {
	position: relative;
	z-index: 1;
}

.n2n-product-single .icon-services {
	height: auto;
	min-height: 220px;
	padding: 24px 20px;
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.08) !important;
	border: 1px solid rgba(255, 255, 255, 0.12);
	backdrop-filter: blur(6px);
	color: #ffffff;
	transition: transform 0.25s ease, background 0.25s ease;
}

.n2n-product-single .icon-services:hover {
	transform: translateY(-4px);
	background: rgba(255, 255, 255, 0.12) !important;
	text-align: center !important;
}

.n2n-product-single .icon-services h3,
.n2n-product-single .icon-services p,
.n2n-product-single .icon-services .hover_content p {
	color: #e8eef5 !important;
}

.n2n-product-single .icon-services img {
	width: 64px;
	filter: brightness(1.1);
}

.n2n-product-single .col-services {
	margin-bottom: 18px;
}

/* ── Responsive ── */
@media (max-width: 991px) {
	.n2n-product-single .content-single > .row,
	.n2n-product-single .tabs-bg {
		padding: 20px;
	}
}

@media (max-width: 767px) {
	.n2n-products-hero {
		padding: 36px 0 44px;
	}

	.n2n-products-page__body,
	.n2n-product-single__body {
		padding-bottom: 48px;
	}

	.n2n-product-single .nav-tabs-custom.n2n-product-tabs {
		flex-direction: column;
		align-items: stretch;
	}

	.n2n-product-single .nav-tabs-custom.n2n-product-tabs a {
		text-align: center;
	}
}

/* ── Dark theme ── */
body.n2n-theme-dark.n2n-products-context,
html.n2n-theme-dark body.n2n-products-context {
	background: #0b1628;
}

body.n2n-theme-dark .n2n-products-page,
body.n2n-theme-dark .n2n-product-single {
	background: #0b1628;
}

body.n2n-theme-dark .n2n-products-page .item-product a,
body.n2n-theme-dark .n2n-products-page .n2n-product-card a,
body.n2n-theme-dark .n2n-product-single .content-single > .row,
body.n2n-theme-dark .n2n-product-single .tabs-bg {
	background: #132238;
	border-color: rgba(255, 255, 255, 0.08);
}

body.n2n-theme-dark .n2n-products-page .product-content h4,
body.n2n-theme-dark .n2n-product-single .content-single h2 {
	color: #f1f5f9;
}

body.n2n-theme-dark .n2n-products-page .product-content p,
body.n2n-theme-dark .n2n-product-single .content-single p,
body.n2n-theme-dark .n2n-products-intro {
	color: #94a3b8;
}

body.n2n-theme-dark .n2n-product-single .nav-tabs-custom.n2n-product-tabs a {
	background: rgba(0, 102, 196, 0.2);
	color: #e2e8f0 !important;
}
