/* NKE Site – frontend */
:root {
	--nks-primary: var(--primary-color, #1f0a8f);
	--nks-accent: #f59e0b;
	--nks-border: #e5e7eb;
	--nks-muted: #6b7280;
	--nks-soft: #f5f6fb;
	--nks-radius: 12px;
}

/* ---------- Song ngữ VI / EN (Google Language Translator, gốc = vi) ---------- */
.nks-lang-en { display: none; }
html.translated-ltr .nks-lang-en, html.translated-rtl .nks-lang-en { display: block; }
html.translated-ltr span.nks-lang-en, html.translated-rtl span.nks-lang-en { display: inline; }
html.translated-ltr .nks-lang-vi, html.translated-rtl .nks-lang-vi { display: none; }

/* ---------- Trang chủ: khung chung ---------- */
.nks-home { --gap: 22px; }
.nks-container { max-width: 1170px; margin: 0 auto; padding: 0 15px; }
.nks-head { margin-bottom: 26px; }
.nks-head--center { text-align: center; }
.nks-eyebrow { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--nks-accent); margin-bottom: 6px; }
.nks-title { margin: 0; font-size: clamp(22px, 2.6vw, 30px); color: var(--nks-primary); text-transform: uppercase; letter-spacing: .5px; }
.nks-title::after { content: ""; display: block; width: 64px; height: 3px; margin: 12px auto 0; border-radius: 3px; background: var(--nks-accent); }

/* Thanh 7 danh mục */
.nks-catnav { padding: 46px 0 34px; background: linear-gradient(180deg, #fff 0%, var(--nks-soft) 100%); }
.nks-catnav__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 14px; }
.nks-catnav__item {
	position: relative; display: flex; flex-direction: column; align-items: center; text-align: center;
	padding: 18px 10px 16px; background: #fff; border: 1px solid var(--nks-border); border-radius: var(--nks-radius);
	color: #111827; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.nks-catnav__item:hover { transform: translateY(-4px); border-color: var(--nks-primary); box-shadow: 0 12px 28px rgba(31, 10, 143, .12); color: var(--nks-primary); }
.nks-catnav__img { width: 76px; height: 76px; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; border-radius: 50%; background: var(--nks-soft); overflow: hidden; }
.nks-catnav__img img { width: 64px; height: 64px; object-fit: contain; }
.nks-catnav__no { position: absolute; top: 8px; left: 10px; font-size: 11px; font-weight: 700; color: var(--nks-accent); }
.nks-catnav__name { font-size: 12.5px; font-weight: 700; line-height: 1.35; text-transform: uppercase; min-height: 3.9em; display: flex; align-items: center; }
.nks-catnav__count { margin-top: 6px; font-size: 12px; color: var(--nks-muted); }

/* Khu vực từng danh mục */
.nks-cat { padding: 40px 0 26px; border-top: 1px solid var(--nks-border); }
.nks-cat.is-even { background: var(--nks-soft); }
.nks-cat__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 2px solid var(--nks-border); position: relative; }
.nks-cat__head::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 120px; height: 2px; background: var(--nks-primary); }
.nks-cat__label { display: flex; align-items: center; gap: 14px; min-width: 0; }
.nks-cat__no { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 10px; background: var(--nks-primary); color: #fff; font-weight: 800; font-size: 17px; display: flex; align-items: center; justify-content: center; }
.nks-cat__no--eye { background: var(--nks-accent); font-size: 20px; }
.nks-cat__icon { flex: 0 0 auto; width: 54px; height: 54px; border-radius: 10px; background: #fff; border: 1px solid var(--nks-border); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.nks-cat__icon img { width: 46px; height: 46px; object-fit: contain; }
.nks-cat__title { margin: 0; font-size: clamp(17px, 1.8vw, 21px); line-height: 1.3; text-transform: uppercase; }
.nks-cat__title a { color: #111827; }
.nks-cat__title a:hover { color: var(--nks-primary); }
.nks-cat__desc { margin: 4px 0 0; font-size: 13.5px; color: var(--nks-muted); max-width: 720px; }
.nks-cat__more { flex: 0 0 auto; white-space: nowrap; font-weight: 600; font-size: 14px; color: var(--nks-primary); background: none; border: 0; padding: 6px 0; cursor: pointer; text-transform: none; letter-spacing: 0; margin: 0; min-height: 0; line-height: 1.4; }
.nks-cat__more:hover { color: var(--nks-accent); }
.nks-cat__more span { display: inline-block; transition: transform .2s; }
.nks-cat__more:hover span { transform: translateX(4px); }
.nks-cat__empty { padding: 30px 20px; text-align: center; background: #fff; border: 1px dashed #cbd5e1; border-radius: var(--nks-radius); }
.nks-cat__empty p { color: var(--nks-muted); margin-bottom: 12px; }
.nks-recent[hidden] { display: none; }

/* Thẻ sản phẩm trong các khu vực: khung rõ ràng, tách bạch */
.nks-home .nks-products .product-small.col { padding-bottom: 18px; }
.nks-home .nks-products .product-small > .col-inner { height: 100%; background: #fff; border: 1px solid var(--nks-border); border-radius: 10px; overflow: hidden; transition: box-shadow .2s, border-color .2s, transform .2s; }
.nks-home .nks-products .product-small > .col-inner:hover { border-color: var(--nks-primary); box-shadow: 0 10px 24px rgba(17, 24, 39, .1); transform: translateY(-2px); }
.nks-home .nks-products .box-text { padding: 10px 12px 12px; }
.nks-home .nks-products .box-image { background: #fff; }

/* ---------- Giá liên hệ ---------- */
.nks-contact-price { color: var(--nks-primary); font-weight: 700; }
.nks-total-note { color: var(--nks-muted); font-weight: 400; }

/* ---------- Nút trong lưới sản phẩm: [giỏ] [Thêm vào báo giá] ---------- */
.nks-loop-actions { display: flex; align-items: stretch; gap: 6px; margin-top: 8px; }
.nks-loop-actions:empty { display: none; }
.nks-loop-actions .nkq-add.button { margin: 0; flex: 1 1 auto; width: auto; min-width: 0; }
.nks-cart-btn.button {
	flex: 0 0 40px; width: 40px; min-height: 36px; margin: 0; padding: 0; display: inline-flex; align-items: center; justify-content: center;
	border-radius: 6px; background: var(--nks-primary); color: #fff; border: 1.5px solid var(--nks-primary); line-height: 1;
}
.nks-cart-btn.button:hover { background: var(--nks-accent); border-color: var(--nks-accent); color: #fff; }
.nks-cart-btn.loading { opacity: .6; }
.nks-cart-btn.added::after { display: none; }
.nks-loop-actions .added_to_cart { display: none; }

/* ---------- Form đăng ký ---------- */
form.register #reg_email::placeholder { font-size: 13px; }

@media (max-width: 1100px) {
	.nks-catnav__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
	.nks-catnav { padding: 32px 0 22px; }
	.nks-catnav__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.nks-catnav__item:last-child:nth-child(odd) { grid-column: 1 / -1; }
	.nks-catnav__img { width: 60px; height: 60px; }
	.nks-catnav__img img { width: 50px; height: 50px; }
	.nks-cat { padding: 28px 0 16px; }
	.nks-cat__head { flex-direction: column; align-items: flex-start; gap: 8px; }
	.nks-cat__icon { display: none; }
	.nks-cat__desc { display: none; }
	.nks-cat__no { width: 36px; height: 36px; font-size: 15px; }
}

/* ---------- Ẩn chữ trên Header (Giỏ hàng, Đăng nhập) ---------- */
.header-cart-title { display: none !important; }
.account-item.has-icon .nav-top-link > span { display: none !important; }
.cart-item.has-icon .nav-top-link > span.heading-font { display: none !important; }

/* ---------- Chuyên đề Tư vấn kỹ thuật (R. STAHL Explosion Protection) ---------- */
.nks-tech-article {
	font-size: 16px;
	line-height: 1.75;
	color: #1f2937;
}
.nks-tech-article p {
	margin: 0 0 1.15em;
}
.nks-tech-article .nks-lead {
	font-size: 17.5px;
	line-height: 1.75;
	font-weight: 500;
	color: #111827;
	padding: 18px 22px;
	background: #f8fafc;
	border-left: 4px solid var(--nks-primary, #1f0a8f);
	border-radius: 0 10px 10px 0;
	margin-bottom: 1.6em;
}
.nks-tech-article h2 {
	font-size: clamp(20px, 2.2vw, 24px);
	line-height: 1.35;
	color: var(--nks-primary, #1f0a8f);
	margin: 2em 0 0.8em;
	padding-bottom: 10px;
	border-bottom: 2px solid #e5e7eb;
	position: relative;
}
.nks-tech-article h2::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -2px;
	width: 72px;
	height: 2px;
	background: var(--nks-accent, #f59e0b);
}
.nks-tech-article h3 {
	font-size: clamp(17px, 1.8vw, 19.5px);
	line-height: 1.4;
	color: #111827;
	margin: 1.5em 0 0.6em;
}
.nks-tech-article ul,
.nks-tech-article ol {
	margin: 0 0 1.25em 1.25em;
	padding: 0;
}
.nks-tech-article li {
	margin-bottom: 0.45em;
}
.nks-tech-article li > ul {
	margin-top: 0.4em;
	margin-bottom: 0.4em;
}
.nks-tech-article code {
	display: inline-block;
	padding: 2px 7px;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 0.9em;
	font-weight: 600;
	color: #1e1b4b;
	background: #eef2ff;
	border: 1px solid #c7d2fe;
	border-radius: 5px;
}

/* Thanh ghi nguồn ngắn gọn (Tên tài liệu & Tác giả) ở đầu bài */
.nks-doc-banner {
	padding: 11px 18px;
	margin-bottom: 20px;
	background: #f1f5f9;
	border: 1px solid #cbd5e1;
	border-left: 4px solid var(--nks-primary, #1f0a8f);
	border-radius: 8px;
}
.nks-tech-article .nks-doc-banner__source {
	margin: 0;
	font-size: 14.5px;
	line-height: 1.5;
	color: #1e293b;
}
.nks-doc-banner__sep {
	margin: 0 8px;
	color: #94a3b8;
}

/* Bảng kỹ thuật */
.nks-table-wrap {
	margin: 1.5em 0 1.8em;
	overflow-x: auto;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.nks-table {
	width: 100%;
	border-collapse: collapse;
	margin: 0;
	font-size: 14.5px;
	line-height: 1.55;
}
.nks-table caption {
	caption-side: top;
	text-align: left;
	padding: 12px 16px;
	font-weight: 700;
	font-size: 15px;
	color: #fff;
	background: var(--nks-primary, #1f0a8f);
}
.nks-table th,
.nks-table td {
	padding: 11px 14px;
	border-bottom: 1px solid #e5e7eb;
	border-right: 1px solid #f1f5f9;
	vertical-align: top;
	text-align: left;
}
.nks-table th:last-child,
.nks-table td:last-child {
	border-right: 0;
}
.nks-table thead th {
	background: #f1f5f9;
	color: #0f172a;
	font-weight: 700;
	border-bottom: 2px solid #cbd5e1;
}
.nks-table tbody tr:nth-child(even) {
	background: #f8fafc;
}
.nks-table tbody tr:hover {
	background: #eef2ff;
}
.nks-tech-article .nks-table-note {
	margin: 8px 14px 10px;
	font-size: 13px;
	color: #475569;
	font-style: italic;
}

/* Hình ảnh & Sơ đồ kỹ thuật */
.nks-figure {
	margin: 1.8em 0;
	padding: 16px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	text-align: center;
	box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}
.nks-figure img {
	max-width: 100%;
	height: auto;
	margin: 0 auto;
	display: block;
	border-radius: 6px;
}
.nks-figure figcaption {
	margin-top: 12px;
	padding-top: 10px;
	border-top: 1px dashed #e2e8f0;
	font-size: 13.5px;
	color: #475569;
	font-style: italic;
}

/* Hộp thông tin / Định nghĩa nổi bật */
.nks-infobox,
.nks-code-examples {
	margin: 1.5em 0;
	padding: 18px 22px;
	background: #fffbeb;
	border: 1px solid #fde68a;
	border-left: 4px solid var(--nks-accent, #f59e0b);
	border-radius: 8px;
}
.nks-infobox-title {
	font-weight: 700;
	font-size: 16px;
	color: #92400e;
	margin-bottom: 8px;
	text-transform: uppercase;
	letter-spacing: 0.4px;
}
.nks-infobox p:last-child,
.nks-code-examples p:last-child {
	margin-bottom: 0;
}

/* Khung điều hướng trọn bộ 6 bài cuối bài viết */
.nks-series-nav {
	margin-top: 2.6em;
	padding: 24px;
	background: #f8fafc;
	border: 1px solid #cbd5e1;
	border-radius: 14px;
}
.nks-series-nav__head {
	margin-bottom: 16px;
}
.nks-tech-article .nks-series-nav__title {
	margin: 0 0 6px;
	font-size: 18px;
	color: var(--nks-primary, #1f0a8f);
}
.nks-tech-article .nks-series-nav__sub {
	margin: 0;
	font-size: 14px;
	color: #475569;
}
.nks-tech-article .nks-series-nav__list {
	list-style: none;
	margin: 0 0 20px;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr;
	gap: 8px;
}
.nks-series-nav__item {
	margin: 0;
	border-radius: 8px;
	background: #fff;
	border: 1px solid #e2e8f0;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.nks-series-nav__item a,
.nks-series-nav__item.is-current {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 14px;
	text-decoration: none;
	color: #1e293b;
	font-size: 14.5px;
	line-height: 1.45;
}
.nks-series-nav__item:hover {
	border-color: var(--nks-primary, #1f0a8f);
	box-shadow: 0 4px 12px rgba(31, 10, 143, 0.08);
}
.nks-series-nav__item.is-current {
	background: #eef2ff;
	border-color: var(--nks-primary, #1f0a8f);
	font-weight: 700;
	color: var(--nks-primary, #1f0a8f);
}
.nks-series-nav__num {
	flex: 0 0 28px;
	width: 28px;
	height: 28px;
	border-radius: 6px;
	background: #e2e8f0;
	color: #334155;
	font-size: 12px;
	font-weight: 800;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.nks-series-nav__item.is-current .nks-series-nav__num {
	background: var(--nks-primary, #1f0a8f);
	color: #fff;
}
.nks-series-nav__pager {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
	padding-top: 14px;
	border-top: 1px solid #e2e8f0;
}
.nks-series-nav__pager-link {
	display: flex;
	flex-direction: column;
	padding: 12px 16px;
	background: #fff;
	border: 1px solid #cbd5e1;
	border-radius: 10px;
	text-decoration: none;
	color: #1e293b;
	transition: border-color 0.15s ease, transform 0.15s ease;
}
.nks-series-nav__pager-link:hover {
	border-color: var(--nks-primary, #1f0a8f);
	transform: translateY(-2px);
}
.nks-series-nav__pager-link.is-next {
	text-align: right;
}
.nks-series-nav__pager-dir {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--nks-accent, #f59e0b);
	margin-bottom: 4px;
}
.nks-series-nav__pager-title {
	font-size: 13.5px;
	line-height: 1.4;
	color: var(--nks-primary, #1f0a8f);
}

@media (max-width: 768px) {
	.nks-doc-banner {
		flex-direction: column;
		align-items: flex-start;
	}
	.nks-series-nav__pager {
		grid-template-columns: 1fr;
	}
	.nks-series-nav__pager-spacer {
		display: none;
	}
}
