/* ==========================================================================
   LNP – B2B UI layer cho lynapgiaysaigon.com (nạp sau CSS cũ)
   Prefix .lnp- để không đụng class cũ (cat-products, c-products…)
   ========================================================================== */
:root {
	--lnp-primary: #0a6fd6;      /* xanh thương hiệu hiện tại, đậm hơn để đạt tương phản AA với chữ trắng */
	--lnp-primary-700: #0857a8;
	--lnp-navy: #0b2545;
	--lnp-accent: #1fa85a;       /* xanh lá "eco" – dùng cho badge an toàn thực phẩm */
	--lnp-zalo: #0068ff;
	--lnp-text: #1d2433;
	--lnp-muted: #5b6577;
	--lnp-line: #e3e8ef;
	--lnp-bg-soft: #f4f7fb;
	--lnp-radius: 4px; --lnp-r: 4px;
	--lnp-shadow: 0 1px 0 rgba(11, 37, 69, .08);
}

/* H1 trang chủ: có cho SEO, hiển thị gọn (không ẩn bằng display:none) */
.lnp-home-h1 {
	max-width: 1200px; margin: 16px auto 0; padding: 0 15px;
	font-size: clamp(18px, 2.2vw, 26px); line-height: 1.35; color: var(--lnp-navy); font-weight: 700;
}

/* ---------- Buttons ---------- */
.lnp-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	min-height: 44px; padding: 0 20px; border-radius: var(--lnp-r); font-weight: 600; font-size: 15px;
	text-decoration: none !important; border: 2px solid transparent; transition: .2s ease; cursor: pointer; line-height: 1.2;
}
.lnp-btn--sm { min-height: 38px; padding: 0 14px; font-size: 14px; }
.lnp-btn--primary { background: var(--lnp-primary); color: #fff !important; }
.lnp-btn--primary:hover { background: var(--lnp-primary-700); }
.lnp-btn--outline { border-color: var(--lnp-primary); color: var(--lnp-primary) !important; background: #fff; }
.lnp-btn--outline:hover { background: var(--lnp-primary); color: #fff !important; }
.lnp-btn--zalo { background: var(--lnp-zalo); color: #fff !important; }
.lnp-btn--ghost { color: var(--lnp-primary) !important; padding: 0; min-height: 0; }
.lnp-btn--ghost:hover { text-decoration: underline !important; }

/* ---------- Category section + tabs ---------- */
.lnp-cat { padding: 28px 0; }
.lnp-cat + .lnp-cat { border-top: 1px solid var(--lnp-line); }
.lnp-cat__head {
	display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap;
	background: var(--lnp-primary); color: #fff; border-radius: var(--lnp-r); padding: 10px 12px 10px 22px; margin-bottom: 20px;
}
.lnp-cat__title { margin: 0; font-size: clamp(20px, 2.4vw, 28px); font-weight: 800; text-transform: uppercase; letter-spacing: .3px; }
.lnp-cat__title a { color: #fff !important; text-decoration: none; }
.lnp-cat__tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.lnp-cat__tab {
	appearance: none; border: 1.5px solid rgba(255,255,255,.7); background: transparent; color: #fff;
	min-height: 40px; padding: 0 16px; border-radius: var(--lnp-r); font-weight: 600; font-size: 14px; cursor: pointer;
	margin: 0; text-transform: uppercase; letter-spacing: .2px;
}
.lnp-cat__tab:hover { background: rgba(255,255,255,.15); }
.lnp-cat__tab.is-active, .lnp-cat__tab[aria-selected="true"] { background: #fff; color: var(--lnp-primary); border-color: #fff; }
.lnp-cat__tab:focus-visible { outline: 3px solid #ffd54a; outline-offset: 2px; }
.lnp-cat__panel[hidden] { display: none !important; }
.lnp-cat__more { text-align: center; margin: 18px 0 0; }
.lnp-cat__empty { padding: 24px; background: var(--lnp-bg-soft); border-radius: var(--lnp-r); text-align: center; }

/* ---------- Product grid + card ---------- */
.lnp-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.lnp-card {
	display: flex; flex-direction: column; background: #fff; border: 1px solid var(--lnp-line);
	border-radius: 0; overflow: hidden; transition: box-shadow .2s, transform .2s;
}
.lnp-card:hover { box-shadow: var(--lnp-shadow); transform: translateY(-2px); }
.lnp-card__thumb { display: block; aspect-ratio: 1 / 1; background: var(--lnp-bg-soft); }
.lnp-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lnp-card__body { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px 16px; flex: 1; }
.lnp-card__title { margin: 0; font-size: 15px; line-height: 1.4; font-weight: 600; min-height: 2.8em; }
.lnp-card__title a { color: var(--lnp-text) !important; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lnp-card__title a:hover { color: var(--lnp-primary) !important; }
.lnp-card__meta { margin: 0; font-size: 13px; color: var(--lnp-muted); display: flex; gap: 10px; flex-wrap: wrap; }
.lnp-card .lnp-btn { margin-top: auto; align-self: flex-start; }

.lnp-price a { font-weight: 700; color: var(--lnp-primary); }

/* ---------- Product detail CTA ---------- */
.lnp-pdp-cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.lnp-pdp-cta__usp { flex-basis: 100%; margin: 8px 0 0; padding: 14px 16px 14px 34px; background: var(--lnp-bg-soft); border-radius: var(--lnp-r); font-size: 14px; color: var(--lnp-text); }
.lnp-pdp-cta__usp li { margin: 4px 0; }
/* Ẩn khối số lượng/nút giỏ hàng còn sót trong template custom */
.single-product form.cart .quantity, .single-product .buy-now-button, .single-product .nk-btn-buy-now { display: none !important; }

/* ---------- Mobile bottom CTA bar ---------- */
.lnp-mbar { display: none; }
@media (max-width: 849px) {
	.lnp-mbar {
		display: grid; grid-template-columns: 1fr 1fr 1.4fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 9990;
		background: #fff; border-top: 1px solid var(--lnp-line); box-shadow: 0 -4px 16px rgba(0,0,0,.08);
		padding-bottom: env(safe-area-inset-bottom);
	}
	.lnp-mbar__item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; font-size: 12px; font-weight: 600; color: var(--lnp-navy) !important; text-decoration: none !important; }
	.lnp-mbar__item--primary { background: var(--lnp-primary); color: #fff !important; }
	body { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
	/* Nút nổi cũ che nội dung → ẩn trên mobile (desktop giữ nguyên) */
	.wp-cta-container, .wp-hotline-container { display: none !important; }
	#top-link, .back-to-top { bottom: 72px !important; }
}

/* ---------- Responsive grid ---------- */
@media (max-width: 1024px) { .lnp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 849px) {
	.lnp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.lnp-cat { padding: 18px 0; }
	.lnp-cat__head { padding: 12px 14px; border-radius: var(--lnp-r); }
	/* Tab cuộn ngang trên mobile, không xuống dòng lộn xộn */
	.lnp-cat__tabs { flex-wrap: nowrap; overflow-x: auto; width: 100%; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
	.lnp-cat__tabs::-webkit-scrollbar { display: none; }
	.lnp-cat__tab { flex: 0 0 auto; min-height: 36px; font-size: 13px; padding: 0 12px; }
	.lnp-card__body { padding: 10px; }
	.lnp-card__title { font-size: 14px; }
	.lnp-card .lnp-btn { align-self: stretch; }
}
@media (prefers-reduced-motion: reduce) { .lnp-card, .lnp-btn { transition: none; } .lnp-card:hover { transform: none; } }

/* ==========================================================================
   v1.1 – Section components (Trang chủ / Giới thiệu / Danh mục / SP / Báo giá)
   ========================================================================== */
.lnp-sec { padding: clamp(32px, 5vw, 64px) 0; }
.lnp-sec:nth-of-type(even) { background: var(--lnp-bg-soft); }
.lnp-narrow { max-width: 860px; margin-inline: auto; }
.lnp-sec__head { text-align: center; margin-bottom: clamp(20px, 3vw, 36px); }
.lnp-sec__title { margin: 0 0 8px; font-size: clamp(22px, 2.6vw, 32px); font-weight: 800; color: var(--lnp-navy); line-height: 1.25; }
.lnp-sec__sub { margin: 0 auto; max-width: 640px; color: var(--lnp-muted); font-size: 16px; }

/* Trust bar */
.lnp-trust { background: var(--lnp-navy); color: #fff; }
.lnp-trust__list { list-style: none; margin: 0; padding: 14px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.lnp-trust__item { display: flex; align-items: center; gap: 10px; margin: 0; font-weight: 600; font-size: 15px; }
.lnp-trust__item svg { color: #6ee7a8; flex: 0 0 auto; }

/* Why */
.lnp-why__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.lnp-why__item { background: #fff; border: 1px solid var(--lnp-line); border-radius: var(--lnp-r); padding: 24px 20px; }
.lnp-why__num { display: inline-block; font-weight: 800; color: var(--lnp-primary); font-size: 14px; letter-spacing: 1px; margin-bottom: 8px; }
.lnp-why__title { margin: 0 0 8px; font-size: 18px; color: var(--lnp-navy); }
.lnp-why__item p { margin: 0; color: var(--lnp-muted); font-size: 15px; }

/* Capacity */
.lnp-cap__stats { list-style: none; margin: 0 0 28px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.lnp-cap__stats li { margin: 0; text-align: center; padding: 20px; background: #fff; border-radius: var(--lnp-r); box-shadow: var(--lnp-shadow); }
.lnp-cap__stats strong { display: block; font-size: clamp(26px, 3vw, 38px); color: var(--lnp-primary); line-height: 1.1; }
.lnp-cap__stats span { color: var(--lnp-muted); font-size: 14px; }
.lnp-cap__gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.lnp-cap__gallery figure { margin: 0; border-radius: 0; overflow: hidden; aspect-ratio: 4 / 3; position: relative; }
.lnp-cap__gallery img { width: 100%; height: 100%; object-fit: cover; }
.lnp-cap__gallery figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 12px; font-size: 13px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.6)); }

/* Process */
.lnp-proc__list { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.lnp-proc__step { counter-increment: s; position: relative; margin: 0; padding: 56px 16px 16px; background: #fff; border-radius: var(--lnp-r); border: 1px solid var(--lnp-line); }
.lnp-proc__step::before { content: counter(s); position: absolute; top: 14px; left: 16px; width: 32px; height: 32px; border-radius: 0; background: var(--lnp-primary); color: #fff; font-weight: 700; display: grid; place-items: center; }
.lnp-proc__step h3 { margin: 0 0 6px; font-size: 17px; color: var(--lnp-navy); }
.lnp-proc__step p { margin: 0; font-size: 14px; color: var(--lnp-muted); }

/* Logos / certs */
.lnp-logos__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; align-items: center; }
.lnp-logos__grid li { margin: 0; background: #fff; border-radius: var(--lnp-r); padding: 12px; display: grid; place-items: center; aspect-ratio: 3 / 2; }
.lnp-logos__grid img { max-height: 64px; width: auto; object-fit: contain; filter: grayscale(1); opacity: .8; transition: .2s; }
.lnp-logos__grid li:hover img { filter: none; opacity: 1; }
.lnp-certs .lnp-logos__grid { grid-template-columns: repeat(4, 1fr); }
.lnp-certs .lnp-logos__grid li { aspect-ratio: 3 / 4; }
.lnp-certs .lnp-logos__grid img { max-height: none; filter: none; opacity: 1; }

/* FAQ */
.lnp-faq__item { background: #fff; border: 1px solid var(--lnp-line); border-radius: var(--lnp-r); margin-bottom: 10px; }
.lnp-faq__item summary { cursor: pointer; padding: 16px 48px 16px 18px; font-weight: 600; color: var(--lnp-navy); list-style: none; position: relative; }
.lnp-faq__item summary::-webkit-details-marker { display: none; }
.lnp-faq__item summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 22px; color: var(--lnp-primary); }
.lnp-faq__item[open] summary::after { content: "–"; }
.lnp-faq__a { padding: 0 18px 16px; color: var(--lnp-text); }

/* Quote */
.lnp-quote { background: linear-gradient(135deg, var(--lnp-navy), #123a6b) !important; color: #fff; }
.lnp-quote .lnp-sec__title, .lnp-quote .lnp-sec__sub { color: #fff; text-align: left; margin-left: 0; }
.lnp-quote__wrap { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(24px, 4vw, 56px); align-items: start; }
.lnp-quote__channels, .lnp-quote__offices { list-style: none; margin: 20px 0 0; padding: 0; }
.lnp-quote__channels li, .lnp-quote__offices li { margin: 0 0 10px; }
.lnp-quote a { color: #fff !important; }
.lnp-quote__form { background: #fff; color: var(--lnp-text); border-radius: var(--lnp-r); padding: clamp(18px, 3vw, 32px); }
.lnp-quote__form a { color: var(--lnp-primary) !important; }
.lnp-quote__form input:not([type=submit]):not([type=checkbox]):not([type=radio]), .lnp-quote__form select, .lnp-quote__form textarea { width: 100%; min-height: 44px; border-radius: var(--lnp-r); }
.lnp-quote__form .wpcf7-submit { background: var(--lnp-primary); color: #fff; border-radius: var(--lnp-r); min-height: 48px; padding: 0 28px; font-weight: 700; border: 0; }
.lnp-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.lnp-form-grid .full { grid-column: 1 / -1; }

/* Hero (Giới thiệu / Báo giá) */
.lnp-hero { position: relative; background: var(--lnp-navy); color: #fff; padding: clamp(40px, 7vw, 96px) 0; overflow: hidden; }
.lnp-hero--slim { padding: clamp(28px, 4vw, 48px) 0; }
.lnp-hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; }
.lnp-hero__inner { position: relative; }
.lnp-hero__title { color: #fff; margin: 8px 0 12px; font-size: clamp(26px, 3.6vw, 44px); }
.lnp-hero__lead { max-width: 720px; font-size: 17px; opacity: .92; }
.lnp-hero .rank-math-breadcrumb, .lnp-hero .rank-math-breadcrumb a { color: rgba(255,255,255,.8); font-size: 14px; }
.lnp-hero__cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.lnp-hero .lnp-btn--outline { background: transparent; border-color: #fff; color: #fff !important; }

/* Offices */
.lnp-offices__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.lnp-office { background: #fff; border: 1px solid var(--lnp-line); border-radius: var(--lnp-r); padding: 20px; }
.lnp-office__name { font-size: 20px; margin: 0 0 6px; color: var(--lnp-navy); }
.lnp-office__map { width: 100%; height: 260px; border: 0; border-radius: var(--lnp-r); margin-top: 10px; }

/* Category page */
.lnp-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 20px; }
.lnp-chip { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: var(--lnp-r); border: 1.5px solid var(--lnp-line); color: var(--lnp-text) !important; font-weight: 600; font-size: 14px; text-decoration: none !important; background: #fff; }
.lnp-chip:hover { border-color: var(--lnp-primary); color: var(--lnp-primary) !important; }
.lnp-chip.is-active { background: var(--lnp-primary); border-color: var(--lnp-primary); color: #fff !important; }
.lnp-cat-content { margin: 40px 0 0; padding-top: 32px; border-top: 1px solid var(--lnp-line); }

/* PDP specs */
.lnp-specs { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; }
.lnp-specs th, .lnp-specs td { border: 1px solid var(--lnp-line); padding: 10px 12px; text-align: left; vertical-align: top; }
.lnp-specs th { width: 40%; background: var(--lnp-bg-soft); font-weight: 600; color: var(--lnp-navy); }

@media (max-width: 1024px) {
	.lnp-why__grid { grid-template-columns: repeat(2, 1fr); }
	.lnp-proc__list { grid-template-columns: repeat(3, 1fr); }
	.lnp-logos__grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 849px) {
	.lnp-trust__list { grid-template-columns: 1fr 1fr; padding: 12px 0; }
	.lnp-trust__item { font-size: 13px; }
	.lnp-why__grid, .lnp-offices__grid, .lnp-quote__wrap { grid-template-columns: 1fr; }
	.lnp-proc__list { grid-template-columns: 1fr; }
	.lnp-proc__step { padding: 16px 16px 16px 60px; }
	.lnp-cap__gallery, .lnp-cap__stats { grid-template-columns: 1fr 1fr; }
	.lnp-why__item { padding: 18px 16px; }
	.lnp-logos__grid, .lnp-certs .lnp-logos__grid { grid-template-columns: repeat(3, 1fr); }
	.lnp-form-grid { grid-template-columns: 1fr; }
	.lnp-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
	.lnp-chip { flex: 0 0 auto; }
}

/* ==========================================================================
   v1.2 – Trang chủ: N sản phẩm / hàng × số hàng (yêu cầu khách 26/11/2026)
   Desktop/tablet ngang: lưới --lnp-cols cột. Mobile: cuộn ngang, giữ đúng số hàng.
   ========================================================================== */
.lnp-grid.lnp-grid--rows { grid-template-columns: repeat(var(--lnp-cols, 5), minmax(0, 1fr)); gap: 16px; }
.lnp-grid--rows .lnp-card__body { padding: 10px 12px 14px; }
.lnp-grid--rows .lnp-card__title { font-size: 14.5px; }
.lnp-grid--rows .lnp-card .lnp-btn { align-self: stretch; }

@media (max-width: 1024px) {
	.lnp-grid.lnp-grid--rows { gap: 12px; }
}
@media (max-width: 849px) {
	.lnp-grid.lnp-grid--rows {
		grid-template-columns: none;
		grid-template-rows: auto;   /* mobile: 1 hàng, slider tự chạy (lnp.js) */
		grid-auto-flow: column;
		grid-auto-columns: calc((100% - 12px) / 2);  /* đúng 2 ô / màn hình */
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		padding-bottom: 4px;
	}
	.lnp-grid.lnp-grid--rows::-webkit-scrollbar { display: none; }
	.lnp-grid--rows .lnp-card { scroll-snap-align: start; }
}
