/*
Theme Name: VinaSite Thời trang 01 — Nếp
Theme URI: https://vinasite.com.vn/
Description: Mẫu website bán hàng thời trang nam nữ. Giao diện con của vinasite, chạy WooCommerce, trang chủ nhiều khối, trang cửa hàng, chi tiết sản phẩm, giới thiệu và liên hệ. Mẫu demo của VinaSite.
Author: VinaSite
Author URI: https://vinasite.com.vn/
Template: vinasite
Version: 1.0.0
Text Domain: thoitrang-mau-01
*/

/* =====================================================================
 * Nếp — mẫu website bán hàng thời trang.
 *
 * Cố ý khác hẳn các mẫu bán hàng đã có trong bộ: chỉ MỘT họ phông sans
 * (Be Vietnam Pro, dấu tiếng Việt chuẩn), nền trắng, một màu nhấn cam đất, thẻ
 * bo 14px. Mẫu 05 Minh Nhã dùng serif + nền kem + màu mận; mẫu Mộc & Nhà dùng
 * serif + nền giấy + xanh rêu. Nhìn hai giây là phân biệt được.
 * ===================================================================== */

:root {
	--np-ink: #111111;          /* chữ tiêu đề, nền nút chính */
	--np-body: #5F5F5F;         /* chữ nội dung */
	--np-muted: #8A8A8A;        /* chữ phụ, nhãn nhỏ */
	--np-line: #E7E5E2;         /* đường kẻ */
	--np-soft: #F6F5F3;         /* dải nền phụ */
	--np-white: #FFFFFF;
	--np-accent: #E0472C;       /* cam đất: giá khuyến mãi, nhãn, điểm nhấn */
	--np-accent-dark: #C13A22;
	--np-sale: #137A54;         /* xanh: trạng thái còn hàng */

	--np-font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

	--np-max: 1280px;           /* bề ngang khung nội dung */
	--np-gut: clamp(16px, 3.2vw, 40px);
	--np-pad: clamp(56px, 6vw, 104px);   /* khoảng đệm dọc giữa các khối */
	--np-r: 14px;               /* bo góc thẻ */
	--np-r-sm: 8px;
	--np-shadow: 0 1px 2px rgba(17, 17, 17, .04), 0 12px 28px -16px rgba(17, 17, 17, .18);
	/* Bóng đổ nâng thẻ lúc rê chuột — CÙNG HƯỚNG với --np-shadow, chỉ xa hơn. */
	--np-shadow-up: 0 2px 4px rgba(17, 17, 17, .05), 0 22px 44px -20px rgba(17, 17, 17, .28);

	/* THANG CHỮ — 9 bậc, dồn từ 25 cỡ lẻ cũ. Xem README mục "Thang chữ". */
	--np-fs-1: 13px;            /* nhãn nhỏ, chú thích, nhãn trên thẻ, số giỏ */
	--np-fs-2: 14px;            /* chữ phụ, nút, ô nhập nhỏ, đường dẫn phân cấp */
	--np-fs-3: 16px;            /* chữ nội dung — cỡ gốc */
	--np-fs-4: 18px;            /* chữ nội dung lớn, tên sản phẩm */
	--np-fs-5: 22px;            /* tên thương hiệu, nhãn ô danh mục, giá gạch */
	--np-fs-6: clamp(24px, 2.6vw, 34px);   /* tiêu đề phụ, tiêu đề khối nhỏ */
	--np-fs-7: clamp(27px, 3.2vw, 42px);   /* tiêu đề khối */
	--np-fs-8: clamp(32px, 4vw, 50px);     /* tiêu đề trang con */
	--np-fs-9: clamp(34px, 5.2vw, 62px);   /* tiêu đề hero */

	/* THANG KHOẢNG CÁCH, bước 4px. Xem README mục "Thang khoảng cách". */
	--np-s-1: 4px;
	--np-s-2: 8px;
	--np-s-3: 12px;
	--np-s-4: 16px;
	--np-s-5: 24px;
	--np-s-6: 32px;
	--np-s-7: 48px;
	--np-s-8: 64px;

	/* NHỊP CHUYỂN ĐỘNG. Một đường cong cho toàn site, không `linear`. */
	--np-ease: cubic-bezier(.2, .7, .3, 1);
	--np-t-fast: .22s;          /* phản hồi khi rê chuột, khi bấm */
	--np-t-mid: .32s;           /* đổi trạng thái: đầu trang, nút phụ trượt lên */
	--np-t-slow: .7s;           /* hiện dần khi cuộn tới */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body.np-shop {
	margin: 0;
	background: var(--np-white);
	color: var(--np-ink);
	font: 400 16px/1.65 var(--np-font);
	-webkit-font-smoothing: antialiased;
}
body.np-shop a { color: inherit; text-decoration: none; }
body.np-shop img { display: block; max-width: 100%; height: auto; }
body.np-shop button, body.np-shop input, body.np-shop select, body.np-shop textarea { font: inherit; }
/*
 * `color: inherit` chứ không phải một màu cố định: theme mẹ có luật riêng cho
 * `h1`–`h3` trong nội dung (màu xanh của nó), và luật ấy thắng mọi khai báo
 * một lớp của ta. Khai ở đây với hai lớp nên thắng lại, mà cho thừa kế thì
 * tiêu đề tự đúng màu trong cả khối nền sáng lẫn khối nền tối — không phải
 * liệt kê từng ngoại lệ.
 */
body.np-shop h1, body.np-shop h2, body.np-shop h3 {
	margin: 0; color: inherit; line-height: 1.18; letter-spacing: -.02em; }

.np-wrap { width: min(var(--np-max), calc(100% - var(--np-gut) * 2)); margin-inline: auto; }

/* Liên kết bỏ qua: chỉ hiện khi dùng bàn phím. */
.np-skip { position: absolute; z-index: 100; top: 10px; left: 10px; transform: translateY(-200%);
	border-radius: var(--np-r-sm); padding: 12px 16px; background: var(--np-ink); color: #fff; font-weight: 600; }
.np-skip:focus { transform: translateY(0); }

/* Đầu trang dính nên mọi neo `#id` phải chừa sẵn chỗ, nếu không mục được nhảy
   tới sẽ nằm khuất dưới thanh điều hướng. */
.np-main, .np-main [id] { scroll-margin-top: 104px; }

/* =====================================================================
 * NÚT
 * ===================================================================== */
.np-btn {
	min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	border: 1px solid var(--np-ink); border-radius: 999px; padding: 0 26px;
	background: var(--np-ink); color: #fff !important;
	font-size: var(--np-fs-2); font-weight: 600; letter-spacing: .01em; cursor: pointer;
	transition: background .22s ease, border-color .22s ease, color .22s ease, transform .22s cubic-bezier(.22,.8,.3,1);
}
.np-btn:hover { background: var(--np-accent); border-color: var(--np-accent); transform: translateY(-2px); }
.np-btn svg { width: 17px; height: 17px; transition: transform .25s cubic-bezier(.22,.8,.3,1); }
.np-btn:hover svg { transform: translateX(3px); }

.np-btn--ghost { background: transparent; color: var(--np-ink) !important; }
.np-btn--ghost:hover { background: var(--np-ink); border-color: var(--np-ink); color: #fff !important; }

.np-btn--sm { min-height: 42px; padding: 0 20px; font-size: var(--np-fs-1); }

/* Liên kết dạng chữ có gạch chân mọc từ trái. */
.np-link { position: relative; display: inline-flex; align-items: center; gap: 8px; font-size: var(--np-fs-2); font-weight: 600; }
.np-link::after { content: ''; position: absolute; left: 0; right: 0; bottom: -3px; height: 1.5px;
	background: currentColor; transform: scaleX(0); transform-origin: left center;
	transition: transform .28s cubic-bezier(.22,.8,.3,1); }
.np-link:hover::after, .np-link:focus-visible::after { transform: scaleX(1); }
.np-link svg { width: 15px; height: 15px; transition: transform .25s cubic-bezier(.22,.8,.3,1); }
.np-link:hover svg { transform: translateX(3px); }

/* =====================================================================
 * DẢI THÔNG BÁO + ĐẦU TRANG
 * ===================================================================== */
.np-bar { background: var(--np-ink); color: #fff; font-size: var(--np-fs-1); }
.np-bar__in { min-height: 40px; display: flex; justify-content: center; align-items: center; gap: 22px;
	padding: 8px 0; text-align: center; }
.np-bar strong { font-weight: 600; }
.np-bar a { display: inline-flex; align-items: center; gap: 6px; color: #F3C9BF !important; font-weight: 600; white-space: nowrap; transition: color .2s ease; }
.np-bar a svg { width: 15px; height: 15px; transition: transform .25s cubic-bezier(.22,.8,.3,1); }
.np-bar a:hover { color: #fff !important; }
.np-bar a:hover svg { transform: translateX(4px); }

.np-head {
	position: sticky; top: 0; z-index: 50;
	background: rgba(255, 255, 255, .9);
	backdrop-filter: saturate(150%) blur(14px);
	border-bottom: 1px solid var(--np-line);
	transition: background .3s ease, border-color .3s ease, box-shadow .3s ease,
		transform .36s var(--np-ease);
}
/*
 * ĐẦU TRANG THÔNG MINH — ba trạng thái, CHIỀU CAO GIỮ NGUYÊN ở cả ba (thu chiều
 * cao một phần tử `sticky` là kéo cả trang nhích lên, đẩy CLS lên).
 *
 *   is-stuck  rời đỉnh trang — nền đặc hơn, có bóng, dòng mô tả mờ đi
 *   is-past   rời khỏi hero — nền trắng đặc, bóng rõ hơn, kẻ mảnh màu nhấn
 *   is-hidden đang cuộn xuống — trượt lên khỏi khung nhìn bằng `transform`
 */
.np-head.is-stuck { background: rgba(255, 255, 255, .97); border-bottom-color: transparent;
	box-shadow: 0 1px 2px rgba(17,17,17,.04), 0 14px 30px -18px rgba(17,17,17,.3); }
.np-head.is-past { background: var(--np-white);
	box-shadow: 0 1px 2px rgba(17,17,17,.05), 0 18px 36px -20px rgba(17,17,17,.38); }
/* Đường kẻ mảnh màu nhấn, vẽ bằng `transform` nên không chiếm thêm chỗ. */
.np-head::after { content: ''; position: absolute; z-index: 2; left: 0; right: 0; bottom: -1px; height: 2px;
	background: var(--np-accent); transform: scaleX(0); transform-origin: left center;
	transition: transform .5s var(--np-ease); }
.np-head.is-past::after { transform: scaleX(1); }
.np-head.is-hidden { transform: translateY(-100%); }
.np-head__row { min-height: 84px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 26px; }

.np-brand { display: inline-flex; align-items: center; gap: 12px; width: fit-content; }
.np-brand__mark { width: 42px; height: 42px; flex: none; }
.np-brand__mark svg { width: 100%; height: 100%; transition: transform .3s cubic-bezier(.22,.8,.3,1); }
.np-brand:hover .np-brand__mark svg { transform: rotate(-8deg) scale(1.05); }
.np-brand__text { display: block; }
.np-brand__name { display: block; font-size: var(--np-fs-5); font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }
.np-brand__tag { display: block; max-height: 18px; margin-top: 2px; overflow: hidden; color: var(--np-muted);
	font-size: 11px;   /* NGOÀI THANG, cố ý: nhãn siêu nhỏ dưới tên thương hiệu. Lên 13px (bậc 1) là dòng này rộng hơn cả tên thương hiệu và đẩy vỡ cột đầu của đầu trang ở 1000–1180px. */ font-weight: 600; letter-spacing: .16em; white-space: nowrap;
	transition: opacity .25s ease, translate .25s var(--np-ease); }
/* Mờ dần và nhích lên, KHÔNG thu `max-height`/`margin-top` như bản trước — hai
   thuộc tính bố cục, animate là tính lại bố cục mỗi khung hình. Xem README. */
.np-head.is-stuck .np-brand__tag { opacity: 0; translate: 0 -4px; }

.np-nav ul { display: flex; justify-content: center; align-items: center; gap: 30px; list-style: none; margin: 0; padding: 0; }
.np-nav a { position: relative; display: inline-block; padding: 12px 0; font-size: var(--np-fs-3); font-weight: 500; white-space: nowrap; transition: color .2s ease; }
.np-nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 4px; height: 2px; border-radius: 2px;
	background: var(--np-accent); transform: scaleX(0); transform-origin: left center;
	transition: transform .28s cubic-bezier(.22,.8,.3,1); }
.np-nav a:hover, .np-nav a:focus-visible { color: var(--np-accent); }
.np-nav a:hover::after, .np-nav a:focus-visible::after { transform: scaleX(1); }
.np-nav a[aria-current="page"]::after { transform: scaleX(1); }

.np-tools { display: flex; justify-content: flex-end; align-items: center; gap: 14px; }

.np-search { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 6px 0 14px;
	border: 1px solid var(--np-line); border-radius: 999px; background: var(--np-soft);
	transition: border-color .25s ease, box-shadow .25s ease, background .25s ease; }
.np-search:focus-within { border-color: var(--np-ink); background: var(--np-white); box-shadow: 0 0 0 3px rgba(17,17,17,.08); }
.np-search svg { width: 18px; height: 18px; flex: none; color: var(--np-muted); transition: color .25s ease; }
.np-search:focus-within svg { color: var(--np-ink); }
/* Nở thẳng một nhịp, KHÔNG `transition: width` như bản trước — animate `width`
   là tính lại cả hàng đầu trang mỗi khung hình. Cảm giác "mở ra" do viền và
   vòng sáng của `:focus-within` lo. Xem README. */
.np-search input { width: 142px; border: 0; outline: 0; background: transparent; font-size: var(--np-fs-2); }
.np-search input::placeholder { color: var(--np-muted); }
.np-search:focus-within input { width: 198px; }
.np-search button { height: 32px; border: 0; border-radius: 999px; padding: 0 15px; background: var(--np-ink);
	color: #fff; font-size: var(--np-fs-1); font-weight: 600; cursor: pointer; transition: background .2s ease; }
.np-search button:hover { background: var(--np-accent); }

.np-cart { position: relative; min-height: 44px; display: inline-flex; align-items: center; gap: 8px; padding: 0 4px;
	font-size: var(--np-fs-2); font-weight: 600; white-space: nowrap; transition: color .2s ease; }
.np-cart:hover { color: var(--np-accent); }
.np-cart svg { width: 23px; height: 23px; flex: none; transition: transform .3s cubic-bezier(.22,.8,.3,1); }
.np-cart:hover svg { transform: translateY(-2px); }
.np-cart__n { min-width: 21px; height: 21px; display: inline-grid; place-items: center; padding: 0 6px;
	border-radius: 999px; background: var(--np-accent); color: #fff; font-size: var(--np-fs-1); font-weight: 700; }
/* Giỏ rỗng thì không hiện số 0 — nó không cho biết điều gì. */
.np-cart__n[data-np-n="0"] { display: none; }
/* Nảy số khi thêm món vào giỏ. Kịch bản gắn lớp này sau khi WooCommerce thay
   mảnh HTML của thẻ đếm — xem khối 3 trong assets/site.js. */
.np-cart__n.is-bump { animation: np-bump .45s var(--np-ease); }
@keyframes np-bump { 0% { transform: scale(1); } 35% { transform: scale(1.4); } 100% { transform: scale(1); } }
/* Biểu tượng giỏ lắc theo một nhịp nhỏ, để mắt kịp bắt được là có gì đổi. */
.np-cart.is-bump svg { animation: np-cart-lac .5s var(--np-ease); }
@keyframes np-cart-lac {
	0% { transform: translateY(0) rotate(0); }
	30% { transform: translateY(-3px) rotate(-7deg); }
	60% { transform: translateY(0) rotate(5deg); }
	100% { transform: translateY(0) rotate(0); } }

.np-burger { width: 44px; height: 44px; display: none; align-items: center; justify-content: center;
	border: 1px solid var(--np-line); border-radius: 12px; background: var(--np-white); color: var(--np-ink);
	cursor: pointer; transition: border-color .2s ease; }
.np-burger:hover { border-color: var(--np-ink); }
.np-burger span { position: relative; display: block; width: 19px; height: 13px; }
.np-burger i { position: absolute; left: 0; right: 0; height: 2px; border-radius: 2px; background: currentColor;
	transition: transform .3s cubic-bezier(.22,.8,.3,1), opacity .2s ease; }
.np-burger i:nth-child(1) { top: 0; }
.np-burger i:nth-child(2) { top: 5.5px; }
.np-burger i:nth-child(3) { top: 11px; }
.np-burger[aria-expanded="true"] i:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.np-burger[aria-expanded="true"] i:nth-child(2) { opacity: 0; }
.np-burger[aria-expanded="true"] i:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* =====================================================================
 * CHÂN TRANG
 * ===================================================================== */
.np-foot { background: var(--np-ink); color: #EDEBE8; }
.np-foot__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: 50px; padding: 68px 0 52px; }
.np-foot__brand .np-brand__name { color: #fff; }
.np-foot__brand .np-brand__tag { color: #9A9792; }
.np-foot p { margin: 0; }
.np-foot__desc { max-width: 330px; margin-top: 18px; color: #AFACA7; font-size: var(--np-fs-2); line-height: 1.75; }
.np-foot h2 { margin: 0 0 18px; color: #fff; font-size: var(--np-fs-1); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.np-foot ul { list-style: none; margin: 0; padding: 0; }
.np-foot li + li { margin-top: 12px; }
.np-foot li, .np-foot a { color: #C9C6C1; font-size: var(--np-fs-2); }
.np-foot a:hover { color: #fff; }
/* Trượt bằng transform nên các dòng bên cạnh không bị xô. */
.np-foot__col a span { display: inline-block; transition: transform .25s cubic-bezier(.22,.8,.3,1); }
.np-foot__col a:hover span, .np-foot__col a:focus-visible span { transform: translateX(5px); }

.np-foot__lh { margin-top: 22px; }
.np-foot__lh li { display: flex; align-items: center; gap: 10px; }
.np-foot__lh svg { width: 18px; height: 18px; flex: none; color: #8C8884; }

.np-foot__bot { border-top: 1px solid rgba(255,255,255,.12); padding: 18px 0; color: #9A9792; font-size: var(--np-fs-1); }
.np-foot__bot .np-wrap { display: flex; justify-content: space-between; align-items: center; gap: 22px; }
.np-foot__bot a { color: #C9C6C1; text-decoration: underline; text-underline-offset: 2px; }

/* =====================================================================
 * CHUYỂN ĐỘNG THEO CUỘN — ba hiệu ứng, một cái cổng.
 * Ba bộ chọn dưới đây PHẢI KHỚP ba hằng SEL/SEL_CUR/SEL_VE trong site.js.
 * Cổng `html.np-js:not(.np-show-all)`; cả hai lớp gắn từ <head> (header.php).
 * Luật giấu dùng `translate`/`scale` riêng, không `transform`.
 * Đầy đủ ở README mục "Chuyển động theo cuộn".
 * ===================================================================== */

/* --- 1. Hiện dần khi cuộn tới --- */
[data-np-rise] > * { transition: opacity var(--np-t-slow) ease, translate var(--np-t-slow) var(--np-ease); }
html.np-js:not(.np-show-all) [data-np-rise] > *:not(.is-in) { opacity: 0; translate: 0 20px; }

/* Lệch nhịp 80ms giữa các phần tử CÙNG HÀNG, khai bằng `nth-child` chứ không
   tính trong kịch bản. Chu kỳ 4 vì lưới rộng nhất của mẫu là 4 cột. */
[data-np-rise] > *:nth-child(4n+2) { transition-delay: 80ms; }
[data-np-rise] > *:nth-child(4n+3) { transition-delay: 160ms; }
[data-np-rise] > *:nth-child(4n+4) { transition-delay: 240ms; }

/* --- 2. Mở vải (lookbook) — hiệu ứng riêng của mẫu thời trang ---
   Tấm vải màu nền che kín khung ảnh rồi trượt LÊN khỏi khung, ảnh bên trong
   đồng thời co từ 1.08 về 1. Giống lật một trang lookbook. Tấm vải là
   `::before` nên không thêm thẻ nào vào HTML. */
[data-np-cur] { position: relative; overflow: hidden; }
[data-np-cur]::before {
	content: ''; position: absolute; z-index: 4; inset: 0; background: var(--np-soft);
	translate: 0 -101%; transition: translate .8s cubic-bezier(.76, 0, .24, 1); pointer-events: none; }
[data-np-cur] img { transition: scale 1.1s var(--np-ease), transform .55s var(--np-ease); }
html.np-js:not(.np-show-all) [data-np-cur]:not(.is-in)::before { translate: 0 0; }
html.np-js:not(.np-show-all) [data-np-cur]:not(.is-in) img { scale: 1.08; }
/* Ba ô danh mục lệch nhịp 80ms như mọi hàng khác. */
.np-dm [data-np-cur]:nth-child(2)::before, .np-dm [data-np-cur]:nth-child(2) img { transition-delay: 80ms; }
.np-dm [data-np-cur]:nth-child(3)::before, .np-dm [data-np-cur]:nth-child(3) img { transition-delay: 160ms; }

/* --- 3. Nét vẽ dần — dấu kiểm SVG vẽ bằng `stroke-dashoffset`, vòng tròn
   phía sau phóng ra cùng lúc. Một đường kẻ, một SVG nhỏ, chạy một lần. --- */
[data-np-ve] .np-ve__net { transition: stroke-dashoffset .85s var(--np-ease) .25s; }
/* `transform-box: fill-box` để gốc `center` tính theo chính vòng tròn, không
   theo khung 320×240 của cả SVG — thiếu nó là vòng tròn bay chéo. */
[data-np-ve] .np-ve__tron { transition: scale .6s var(--np-ease); transform-box: fill-box; transform-origin: center; }
html.np-js:not(.np-show-all) [data-np-ve]:not(.is-in) .np-ve__net { stroke-dashoffset: 56; }
html.np-js:not(.np-show-all) [data-np-ve]:not(.is-in) .np-ve__tron { scale: 0; }

/* =====================================================================
 * ĐẦU TRANG CON (cửa hàng, danh mục, sản phẩm, trang tĩnh)
 * ===================================================================== */
.np-page__head { padding: 54px 0 44px; background: var(--np-soft); border-bottom: 1px solid var(--np-line); }
.np-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--np-muted); font-size: var(--np-fs-2); }
.np-crumb a:hover { color: var(--np-ink); text-decoration: underline; text-underline-offset: 3px; }
.np-crumb span[aria-hidden] { color: #C6C3BF; }
/* Màu khai lại cho chắc: theme mẹ có luật riêng cho `h1` trong nội dung, không
   đặt lại thì tiêu đề trang ra màu xanh của theme mẹ chứ không phải màu mực. */
.np-page__title { margin-top: 12px; color: var(--np-ink); font-size: var(--np-fs-8); font-weight: 700; }
.np-page__sub { max-width: 620px; margin: 14px 0 0; color: var(--np-body); font-size: var(--np-fs-3); }

/* =====================================================================
 * CỬA HÀNG
 * ===================================================================== */
.np-shop { padding: 36px 0 var(--np-pad); }
.np-shop__bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
	gap: 16px; margin-bottom: 28px; }
.np-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.np-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px;
	border: 1px solid var(--np-line); border-radius: 999px; font-size: var(--np-fs-2); font-weight: 500;
	transition: border-color .2s ease, background .2s ease, color .2s ease; }
.np-chip span { color: var(--np-muted); font-size: var(--np-fs-1); font-weight: 600; }
.np-chip:hover { border-color: var(--np-ink); }
.np-chip.is-on { background: var(--np-ink); border-color: var(--np-ink); color: #fff; }
.np-chip.is-on span { color: rgba(255,255,255,.65); }

.np-shop__sort form.woocommerce-ordering { margin: 0; }
.np-shop__sort select, body.np-shop .woocommerce-ordering select {
	min-height: 40px; border: 1px solid var(--np-line); border-radius: 999px; padding: 0 14px;
	background: var(--np-white); color: var(--np-ink); font-size: var(--np-fs-2); }

.np-trong { padding: 40px 0; color: var(--np-body); }

/* --- Lưới và thẻ sản phẩm (dùng chung cho cửa hàng, danh mục, liên quan) --- */
body.np-shop ul.products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 36px 24px; margin: 0; padding: 0; list-style: none; }
body.np-shop ul.products::before, body.np-shop ul.products::after { display: none; }
body.np-shop ul.products li.product { float: none; width: auto; margin: 0; min-width: 0; }

body.np-shop ul.products li.product a img {
	width: 100%; aspect-ratio: 3 / 4; margin: 0; object-fit: cover;
	border-radius: var(--np-r); background: var(--np-soft);
	transition: transform .5s cubic-bezier(.22,.8,.3,1); }
/* Ảnh phóng nhẹ khi rê chuột. `overflow: hidden` đặt ở thẻ <a> bọc ngoài để
   phần phóng ra bị cắt gọn trong khung bo góc. */
body.np-shop ul.products li.product > a { display: block; overflow: hidden; border-radius: var(--np-r); }
body.np-shop ul.products li.product:hover a img,
body.np-shop ul.products li.product:focus-within a img { transform: scale(1.05); }

/* =====================================================================
 * THẺ SẢN PHẨM KHI RÊ CHUỘT — nâng thẻ 5px, ảnh phóng 1.05 trong khung
 * `overflow: hidden`, nút phụ "Xem nhanh" trượt lên. `:focus-within` đi kèm
 * `:hover` ở cả ba: bàn phím phải thấy đúng những gì chuột thấy.
 * ===================================================================== */
body.np-shop ul.products li.product { position: relative;
	transition: transform var(--np-t-fast) var(--np-ease); }
body.np-shop ul.products li.product:hover,
body.np-shop ul.products li.product:focus-within { transform: translateY(-5px); }

/* Khung nút khớp ĐÚNG khung ảnh: thẻ <a> bọc ảnh là phần tử đầu trong `li` và
   ảnh khai `aspect-ratio: 3/4`, nên một khối `top: 0` cùng tỉ lệ phủ vừa khít,
   không cần đo bằng JavaScript. Liên kết này trùng đích với tên sản phẩm nên
   `tabindex="-1"` + `aria-hidden` — xem np_xem_nhanh() trong inc/shop.php. */
.np-quick { position: absolute; z-index: 3; top: 0; left: 0; right: 0; aspect-ratio: 3 / 4;
	display: flex; align-items: flex-end; justify-content: center; padding: var(--np-s-3);
	border-radius: var(--np-r); pointer-events: none; }
.np-quick span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--np-s-5);
	border-radius: 999px; background: var(--np-white); color: var(--np-ink);
	font-size: var(--np-fs-2); font-weight: 600; box-shadow: var(--np-shadow-up);
	opacity: 0; translate: 0 14px;
	transition: opacity var(--np-t-mid) ease, translate var(--np-t-mid) var(--np-ease); }
body.np-shop ul.products li.product:hover .np-quick,
body.np-shop ul.products li.product:focus-within .np-quick { pointer-events: auto; }
body.np-shop ul.products li.product:hover .np-quick span,
body.np-shop ul.products li.product:focus-within .np-quick span { opacity: 1; translate: 0 0; }
/* Trên màn hình cảm ứng không có "rê chuột" — nút sẽ hiện rồi đứng đó che ảnh,
   nên bỏ hẳn. Tên sản phẩm bên dưới vẫn là liên kết đầy đủ. */
@media (hover: none) { .np-quick { display: none; } }
/* Nhãn "Sale!" mặc định của WooCommerce bị tắt: theme đã có nhãn riêng ở
   `np_nhan_moi()` (inc/shop.php), để cả hai thì hai nhãn chồng lên nhau. */
body.np-shop span.onsale { display: none; }

.np-tags { position: absolute; z-index: 2; top: 12px; left: 12px; display: flex; gap: 6px; }
.np-tag { display: inline-flex; align-items: center; height: 26px; padding: 0 12px; border-radius: 999px;
	background: var(--np-ink); color: #fff; font-size: var(--np-fs-1); font-weight: 600; letter-spacing: .02em; }
.np-tag--sale { background: var(--np-accent); }

body.np-shop ul.products li.product .woocommerce-loop-product__title {
	padding: 14px 0 0; color: var(--np-ink); font-size: var(--np-fs-4); font-weight: 600; line-height: 1.35; }
body.np-shop ul.products li.product .price { display: block; margin: 8px 0 0; color: var(--np-ink);
	font-size: var(--np-fs-3); font-weight: 700; }
body.np-shop ul.products li.product .price del { margin-right: 8px; color: var(--np-muted); font-weight: 500; }
body.np-shop ul.products li.product .price ins { text-decoration: none; color: var(--np-accent); }
body.np-shop ul.products li.product .button { margin-top: 12px; }

/* Nút trong lưới và mọi nút của WooCommerce dùng chung một kiểu. */
body.np-shop ul.products li.product .button,
body.np-shop a.button, body.np-shop button.button, body.np-shop input.button,
body.np-shop .button.alt, body.np-shop #place_order {
	min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
	border: 1px solid var(--np-ink); border-radius: 999px; padding: 0 22px;
	background: var(--np-ink); color: #fff; font-size: var(--np-fs-2); font-weight: 600; line-height: 1;
	/* Thẻ sản phẩm hẹp lại ở lưới ba cột, không chặn thì "Thêm vào giỏ" gãy
	   thành hai dòng và nút cao gấp đôi các nút bên cạnh. */
	white-space: nowrap;
	transition: background .22s ease, border-color .22s ease, transform .22s cubic-bezier(.22,.8,.3,1); }
body.np-shop ul.products li.product .button:hover,
body.np-shop a.button:hover, body.np-shop button.button:hover, body.np-shop input.button:hover,
body.np-shop .button.alt:hover, body.np-shop #place_order:hover {
	background: var(--np-accent); border-color: var(--np-accent); transform: translateY(-2px); }

body.np-shop .woocommerce-pagination { grid-column: 1 / -1; margin-top: 44px; }
body.np-shop .woocommerce-pagination ul { display: flex; justify-content: center; gap: 8px; border: 0; }
body.np-shop .woocommerce-pagination li { border: 0; }
body.np-shop .woocommerce-pagination a, body.np-shop .woocommerce-pagination span {
	min-width: 42px; height: 42px; display: inline-grid; place-items: center; border: 1px solid var(--np-line);
	border-radius: 999px; font-size: var(--np-fs-2); font-weight: 600; }
body.np-shop .woocommerce-pagination span.current { background: var(--np-ink); border-color: var(--np-ink); color: #fff; }

/* =====================================================================
 * CHI TIẾT SẢN PHẨM
 * ===================================================================== */
.np-single__wrap { padding: 44px 0 var(--np-pad); }
body.np-shop div.product { display: grid; grid-template-columns: 1.02fr .98fr; gap: clamp(28px, 5vw, 72px); }
body.np-shop div.product div.images, body.np-shop div.product div.summary { float: none; width: 100%; margin: 0; }
body.np-shop div.product div.images img { width: 100%; border-radius: var(--np-r); }
body.np-shop div.product .woocommerce-product-gallery__wrapper { margin: 0; }
body.np-shop div.product p.price, body.np-shop div.product span.price {
	margin: 0 0 16px; color: var(--np-ink); font-size: 28px;   /* NGOÀI THANG, cố ý: giá trên trang sản phẩm. Dồn về bậc 5 (22px) hay bậc 6 (tới 34px) là đổi hẳn cỡ con số lớn nhất của trang — đổi thiết kế. */ font-weight: 700; }
body.np-shop div.product p.price del { margin-right: 10px; color: var(--np-muted); font-size: var(--np-fs-5); font-weight: 500; }
body.np-shop div.product p.price ins { text-decoration: none; color: var(--np-accent); }
body.np-shop div.product .woocommerce-product-details__short-description {
	margin-bottom: 22px; color: var(--np-body); font-size: var(--np-fs-3); }
body.np-shop div.product form.cart { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 24px; }
body.np-shop .quantity input.qty { width: 84px; min-height: 44px; border: 1px solid var(--np-line);
	border-radius: 999px; padding: 0 12px; text-align: center; font-size: var(--np-fs-2); }
body.np-shop div.product .product_meta { padding-top: 20px; border-top: 1px solid var(--np-line);
	color: var(--np-muted); font-size: var(--np-fs-2); }
body.np-shop div.product .product_meta a { color: var(--np-ink); }

/*
 * `div.product` là lưới hai cột, nên MỌI khối đi sau phần tóm tắt đều là con
 * của lưới ấy. Không cho chúng trải hết hàng thì chúng rơi vào một ô hẹp: lưới
 * sản phẩm liên quan bốn cột bị nhét vào nửa bề ngang, tên sản phẩm xuống dòng
 * từng chữ một và nút vỡ thành ba dòng.
 */
body.np-shop div.product .woocommerce-tabs,
body.np-shop div.product .related,
body.np-shop div.product .upsells { grid-column: 1 / -1; }

body.np-shop .woocommerce-tabs { margin-top: 56px; }
body.np-shop .woocommerce-tabs ul.tabs { display: flex; gap: 8px; margin: 0 0 24px; padding: 0; border: 0; }
body.np-shop .woocommerce-tabs ul.tabs::before { display: none; }
body.np-shop .woocommerce-tabs ul.tabs li { margin: 0; padding: 0; border: 1px solid var(--np-line);
	border-radius: 999px; background: var(--np-white); }
body.np-shop .woocommerce-tabs ul.tabs li::before, body.np-shop .woocommerce-tabs ul.tabs li::after { display: none; }
body.np-shop .woocommerce-tabs ul.tabs li a { display: block; padding: 10px 20px; color: var(--np-body); font-size: var(--np-fs-2); font-weight: 600; }
body.np-shop .woocommerce-tabs ul.tabs li.active { background: var(--np-ink); border-color: var(--np-ink); }
body.np-shop .woocommerce-tabs ul.tabs li.active a { color: #fff; }
body.np-shop .woocommerce-Tabs-panel h2 { margin: 0 0 12px; font-size: var(--np-fs-5); font-weight: 700; }
body.np-shop .woocommerce-Tabs-panel p { max-width: 760px; margin: 0; color: var(--np-body); font-size: var(--np-fs-3); }

body.np-shop div.product .related { margin-top: 64px; }
body.np-shop div.product .related > h2 { margin: 0 0 24px; font-size: var(--np-fs-6); font-weight: 700; }
/* Lưới lồng bên trong thì bỏ căn giữa của lưới cấp trang. */
body.np-shop div.product .related ul.products { width: 100%; }

/* =====================================================================
 * GIỎ HÀNG, THANH TOÁN, TÀI KHOẢN
 *
 * WooCommerce 8 trở đi dựng ba trang này bằng khối (block), với bảng màu riêng
 * lấy từ theme.json chứ không từ CSS của theme con — mặc định ra nút xanh dương
 * giữa một giao diện đen và cam đất. Khai lại ở đây cho khớp.
 * ===================================================================== */
.np-page__body { padding: 44px 0 var(--np-pad); }

body.np-shop .wc-block-components-button:not(.is-link),
body.np-shop .wc-block-cart__submit-button,
body.np-shop .wc-block-components-checkout-place-order-button {
	min-height: 50px; border: 1px solid var(--np-ink); border-radius: 999px; padding: 0 26px;
	background: var(--np-ink); color: #fff; font-size: var(--np-fs-2); font-weight: 600;
	transition: background .22s ease, border-color .22s ease, transform .22s cubic-bezier(.22,.8,.3,1); }
body.np-shop .wc-block-components-button:not(.is-link):hover,
body.np-shop .wc-block-cart__submit-button:hover,
body.np-shop .wc-block-components-checkout-place-order-button:hover {
	background: var(--np-accent); border-color: var(--np-accent); transform: translateY(-2px); }

body.np-shop .wc-block-components-totals-item__value,
body.np-shop .wc-block-components-product-price { color: var(--np-ink); font-weight: 700; }
body.np-shop .wc-block-cart-items__row { border-color: var(--np-line); }
body.np-shop .wc-block-components-product-name { color: var(--np-ink); font-weight: 600; }
body.np-shop .wc-block-components-product-name:hover { color: var(--np-accent); }
body.np-shop .wc-block-components-text-input input,
body.np-shop .wc-block-components-address-form input,
body.np-shop .wc-block-components-quantity-selector { border-radius: var(--np-r-sm); }
body.np-shop .wc-block-components-panel__button { color: var(--np-ink); }

/* Bảng giỏ hàng bản cổ điển (nếu quản trị viên đổi về shortcode). */
body.np-shop table.shop_table { border-color: var(--np-line); border-radius: var(--np-r); }
body.np-shop table.shop_table th { color: var(--np-ink); }

/* =====================================================================
 * Ô NHẬN BẢN TIN + LỜI NHẮN
 * ===================================================================== */
.np-sub { display: flex; gap: 8px; margin-top: 18px; }
.np-sub__in { flex: 1 1 auto; min-width: 0; height: 46px; border: 1px solid rgba(255,255,255,.22);
	border-radius: 999px; padding: 0 16px; background: rgba(255,255,255,.07); color: #fff; font-size: var(--np-fs-2);
	transition: border-color .25s ease, background .25s ease, box-shadow .25s ease; }
.np-sub__in::placeholder { color: #8E8B86; }
.np-sub__in:focus { outline: 0; border-color: #fff; background: rgba(255,255,255,.12);
	box-shadow: 0 0 0 3px rgba(255,255,255,.12); }
.np-sub__go { height: 46px; flex: none; border: 0; border-radius: 999px; padding: 0 22px;
	background: var(--np-accent); color: #fff; font-size: var(--np-fs-2); font-weight: 600; cursor: pointer;
	transition: background .2s ease, transform .2s ease; }
.np-sub__go:hover { background: var(--np-accent-dark); transform: translateY(-1px); }
.np-sub__note { margin: 12px 0 0; color: #8E8B86; font-size: var(--np-fs-1); line-height: 1.65; }

/* Tự ẩn sau 8 giây: lời nhắn chỉ xác nhận một thao tác, để mãi thì che góc màn
   hình. Trình đọc màn hình đã đọc nó ngay lúc xuất hiện nhờ `role="status"`. */
.np-toast { position: fixed; z-index: 80; right: 18px; bottom: 18px; max-width: 340px;
	border-radius: var(--np-r); padding: 15px 16px; background: var(--np-ink); color: #F1EFEC;
	font-size: var(--np-fs-2); line-height: 1.6; box-shadow: 0 20px 44px -20px rgba(17,17,17,.75);
	animation: np-toast-in .35s cubic-bezier(.22,.8,.3,1) both, np-toast-out .45s ease 8s both; }
@keyframes np-toast-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes np-toast-out { to { opacity: 0; visibility: hidden; } }

/* --- Cửa hàng và sản phẩm ở màn hình hẹp --- */
@media (max-width: 1100px) {
	body.np-shop ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
	body.np-shop div.product { grid-template-columns: 1fr; gap: 26px; }
	.np-page__head { padding: 40px 0 34px; }
}
@media (max-width: 640px) {
	body.np-shop ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 14px; }
	body.np-shop ul.products li.product .woocommerce-loop-product__title { font-size: var(--np-fs-3); }
	body.np-shop ul.products li.product .price { font-size: var(--np-fs-2); }
	.np-shop__bar { gap: 12px; }
	.np-chips { gap: 8px; }
	.np-chip { min-height: 36px; padding: 0 12px; font-size: var(--np-fs-1); }
}

/* =====================================================================
 * TRANG CHỦ
 * ===================================================================== */
.np-eyebrow { margin: 0 0 14px; color: var(--np-accent); font-size: var(--np-fs-1); font-weight: 700;
	letter-spacing: .16em; text-transform: uppercase; }

.np-hero { position: relative; display: grid; align-items: end; min-height: min(78vh, 680px);
	padding: clamp(48px, 9vw, 110px) 0 clamp(40px, 6vw, 72px); overflow: hidden; background: var(--np-soft); }
.np-hero__media { position: absolute; inset: 0; overflow: hidden; }
.np-hero__media img { width: 100%; height: 100%; object-fit: cover; }

/* =====================================================================
 * HERO VÀO TRANG — KHÔNG ẨN HERO.
 *
 * Hero quyết định LCP, ẩn nó là đẩy lùi LCP. Cả hai hiệu ứng dưới đây chỉ đổi
 * VỊ TRÍ của thứ đã hiện, không đụng tới `opacity`: chữ và ảnh vẽ ra ngay từ
 * khung hình đầu, chỉ là trượt/co về chỗ. Dùng `animation` chứ không
 * `transition` vì chạy lúc vào trang, chưa có class nào đổi để kích hoạt.
 * ===================================================================== */

/* Ảnh nền zoom RẤT CHẬM: 12 giây cho 6%. Chạy một lần, không vô hạn. */
.np-hero__media img { animation: np-hero-zoom 12s var(--np-ease) both; }
@keyframes np-hero-zoom { from { scale: 1.06; } to { scale: 1; } }

/* Chữ vào theo dòng, lệch nhịp 80ms mỗi dòng. Năm con của `.np-hero__in` là
   năm dòng: nhãn · tiêu đề · đoạn mô tả · hàng nút · dòng chú thích. */
.np-hero__in > * { animation: np-hero-dong .68s var(--np-ease) both; }
@keyframes np-hero-dong { from { translate: 0 18px; } to { translate: 0 0; } }
.np-hero__in > *:nth-child(1) { animation-delay: .04s; }
.np-hero__in > *:nth-child(2) { animation-delay: .12s; }
.np-hero__in > *:nth-child(3) { animation-delay: .2s; }
.np-hero__in > *:nth-child(4) { animation-delay: .28s; }
.np-hero__in > *:nth-child(5) { animation-delay: .36s; }
/* Lớp phủ tối dần về bên trái để chữ trắng luôn đủ tương phản, dù ảnh nền có
   sáng tới đâu. Dùng gradient chứ không phủ đều để ảnh vẫn khoe được. */
.np-hero::after { content: ''; position: absolute; inset: 0;
	background: linear-gradient(100deg, rgba(10,10,10,.82) 0%, rgba(10,10,10,.62) 42%, rgba(10,10,10,.12) 100%); }
.np-hero__in { position: relative; z-index: 2; max-width: 680px; color: #fff; }
.np-hero__in .np-eyebrow { color: #F3C9BF; }
.np-hero h1 { font-size: var(--np-fs-9); font-weight: 700; }
.np-hero__sub { max-width: 560px; margin: 20px 0 0; color: rgba(255,255,255,.88); font-size: clamp(16px, 1.2vw, 18px); }
.np-hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.np-hero__cta .np-btn { background: #fff; border-color: #fff; color: var(--np-ink) !important; }
.np-hero__cta .np-btn:hover { background: var(--np-accent); border-color: var(--np-accent); color: #fff !important; }
.np-hero__cta .np-btn--ghost { background: transparent; border-color: rgba(255,255,255,.55); color: #fff !important; }
.np-hero__cta .np-btn--ghost:hover { background: #fff; border-color: #fff; color: var(--np-ink) !important; }
.np-hero__note { margin: 24px 0 0; color: rgba(255,255,255,.62); font-size: var(--np-fs-1); }

.np-promise { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--np-line); }
.np-promise__item { padding: 26px 22px; text-align: center; }
.np-promise__item + .np-promise__item { border-left: 1px solid var(--np-line); }
.np-promise strong { display: block; font-size: var(--np-fs-3); font-weight: 600; }
.np-promise span { display: block; margin-top: 5px; color: var(--np-muted); font-size: var(--np-fs-2); }

.np-sec { padding: var(--np-pad) 0; }
.np-sec--soft { background: var(--np-soft); }
.np-sec__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 34px; }
.np-sec__head h2 { font-size: var(--np-fs-7); font-weight: 700; }

.np-dm { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.np-dm__item { position: relative; display: block; overflow: hidden; border-radius: var(--np-r); background: var(--np-soft); }
.np-dm__item img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover;
	transition: transform .55s cubic-bezier(.22,.8,.3,1); }
.np-dm__item:hover img { transform: scale(1.05); }
.np-dm__item::after { content: ''; position: absolute; inset: 0;
	background: linear-gradient(to top, rgba(10,10,10,.72) 0%, rgba(10,10,10,.1) 52%, transparent 100%); }
.np-dm__label { position: absolute; z-index: 2; inset: auto 0 0; padding: 26px 24px; color: #fff; }
.np-dm__label strong { display: block; font-size: var(--np-fs-5); font-weight: 700; }
.np-dm__label span { display: block; margin-top: 4px; color: rgba(255,255,255,.78); font-size: var(--np-fs-2); }

.np-story { display: grid; grid-template-columns: .9fr 1.1fr; align-items: center; gap: clamp(28px, 5vw, 72px); }
/* Bo góc đặt ở KHUNG chứ không ở ảnh: tấm vải của hiệu ứng mở vải là `::before`
   của khung, không có bo góc ở đây thì bốn góc vải chìa ra ngoài ảnh. */
.np-story__media { border-radius: var(--np-r); background: var(--np-soft); }
.np-story__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--np-r); }
.np-story__copy h2 { font-size: var(--np-fs-7); font-weight: 700; }
.np-story__copy p { margin: 18px 0 0; color: var(--np-body); font-size: var(--np-fs-3); }
.np-story__copy .np-btn { margin-top: 28px; }

/* --- Khối biểu mẫu: chỉ trên máy tính --- */
/* Đường kẻ tách khối này với chân trang. Đặt ở ĐÂY chứ không ở `.np-foot`: mọi
   trang khác đều kết thúc bằng một khối nền sáng nên chân trang đã tự tách bằng
   màu nền, chỉ riêng trang chủ có hai khối cùng nền mực chạm nhau. Dùng lại
   đúng màu kẻ đã có ở `.np-foot__bot` để toàn site một kiểu đường kẻ. */
.np-dangky { padding: var(--np-pad) 0; background: var(--np-ink); color: #fff;
	border-bottom: 1px solid rgba(255, 255, 255, .12); }
.np-dangky__in { display: grid; grid-template-columns: .85fr 1.15fr; align-items: center; gap: clamp(28px, 5vw, 64px); }
.np-dangky__art svg { width: 100%; height: auto; }
.np-dangky__copy h2 { font-size: var(--np-fs-7); font-weight: 700; }
.np-dangky__copy > p { max-width: 520px; margin: 16px 0 0; color: #AFACA7; font-size: var(--np-fs-3); }
.np-dangky__form { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.np-dangky__field {
	flex: 1 1 260px; min-width: 0; height: 52px; border: 1px solid rgba(255,255,255,.24); border-radius: 999px;
	padding: 0 20px; background: rgba(255,255,255,.07); color: #fff; font-size: var(--np-fs-3);
	transition: border-color .25s ease, background .25s ease, box-shadow .25s ease; }
.np-dangky__field::placeholder { color: #8E8B86; }
.np-dangky__field:focus { outline: 0; border-color: #fff; background: rgba(255,255,255,.12); box-shadow: 0 0 0 3px rgba(255,255,255,.12); }
.np-dangky__form .np-btn { flex: none; min-height: 52px; background: var(--np-accent); border-color: var(--np-accent); }
.np-dangky__form .np-btn:hover { background: #fff; border-color: #fff; color: var(--np-ink) !important; }
.np-dangky__note { margin: 14px 0 0; color: #8E8B86; font-size: var(--np-fs-1); }

/* Khối gọi nhanh thay cho biểu mẫu trên điện thoại. */
.np-goi { display: none; }
.np-goi .np-wrap { display: grid; gap: 16px; justify-items: start; }
.np-goi p { margin: 0; color: #AFACA7; font-size: var(--np-fs-3); }
.np-goi strong { color: #fff; }
.np-goi .np-btn { background: var(--np-accent); border-color: var(--np-accent); }

@media (max-width: 1020px) {
	.np-promise { grid-template-columns: repeat(2, 1fr); }
	.np-promise__item:nth-child(3) { border-left: 0; }
	.np-promise__item:nth-child(n+3) { border-top: 1px solid var(--np-line); }
	.np-dm { grid-template-columns: 1fr 1fr; }
	.np-dm__item:first-child { grid-column: 1 / -1; }
	.np-dm__item:first-child img { aspect-ratio: 16 / 9; }
	.np-story { grid-template-columns: 1fr; }
	.np-story__media img { aspect-ratio: 16 / 10; }
}
@media (max-width: 960px) {
	/*
	 * Gõ email trên điện thoại là việc thừa khi bấm gọi nhanh hơn hẳn, nên dưới
	 * 960px biểu mẫu ẩn hẳn và khối gọi nhanh thế chỗ. `display: none` cũng gỡ
	 * luôn khỏi thứ tự tiêu điểm bàn phím, không cần thêm `inert`.
	 */
	.np-dangky__art,
	.np-dangky__form,
	.np-dangky__note { display: none; }
	.np-dangky__in { grid-template-columns: 1fr; }
	.np-goi { display: block; margin-top: 26px; }
}
@media (max-width: 760px) {
	.np-hero { min-height: 0; }
	.np-sec__head { flex-direction: column; align-items: flex-start; gap: 14px; }
	.np-promise__item { padding: 20px 14px; }
	.np-promise strong { font-size: var(--np-fs-2); }
	.np-promise span { font-size: var(--np-fs-1); }
	.np-dm { grid-template-columns: 1fr; }
	.np-dm__item:first-child img { aspect-ratio: 3 / 4; }
	.np-dm__label { padding: 20px 18px; }
	.np-dm__label strong { font-size: var(--np-fs-4); }
}

/* =====================================================================
 * TRANG GIỚI THIỆU
 * ===================================================================== */
.np-gt { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.np-gt__item { padding: 28px 26px; border: 1px solid var(--np-line); border-radius: var(--np-r);
	background: var(--np-white); transition: border-color .25s ease, transform .25s cubic-bezier(.22,.8,.3,1); }
.np-gt__item:hover { border-color: var(--np-ink); transform: translateY(-3px); }
.np-gt__item h3 { margin: 0 0 10px; font-size: var(--np-fs-4); font-weight: 700; }
.np-gt__item p { margin: 0; color: var(--np-body); font-size: var(--np-fs-3); }

.np-gt__cta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px;
	padding: 40px; border: 1px solid var(--np-line); border-radius: var(--np-r); background: var(--np-soft); }
.np-gt__cta h2 { font-size: var(--np-fs-6); font-weight: 700; }
.np-gt__cta p { max-width: 540px; margin: 12px 0 0; color: var(--np-body); font-size: var(--np-fs-3); }
.np-gt__cta-btn { display: flex; flex-wrap: wrap; gap: 12px; }

/* =====================================================================
 * TRANG LIÊN HỆ
 * ===================================================================== */
.np-lh { display: grid; grid-template-columns: .95fr 1.05fr; gap: clamp(28px, 5vw, 68px); align-items: start; }
.np-lh h2 { font-size: var(--np-fs-6); font-weight: 700; }
.np-lh__list { list-style: none; margin: 26px 0 0; padding: 0; }
.np-lh__list li { display: flex; align-items: flex-start; gap: 12px; padding: 16px 0; border-top: 1px solid var(--np-line); }
.np-lh__list li:last-child { border-bottom: 1px solid var(--np-line); }
.np-lh__list svg { width: 21px; height: 21px; flex: none; margin-top: 3px; color: var(--np-accent); }
.np-lh__list strong { display: block; margin-bottom: 2px; font-size: var(--np-fs-1); font-weight: 700;
	letter-spacing: .1em; text-transform: uppercase; color: var(--np-muted); }
.np-lh__list span { font-size: var(--np-fs-3); }
.np-lh__anh { width: 100%; margin-top: 30px; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--np-r); }

.np-form { margin-top: 24px; }
.np-form__row { display: grid; gap: 8px; margin: 0 0 16px; }
.np-form__row label { font-size: var(--np-fs-2); font-weight: 600; }
.np-form input, .np-form textarea {
	width: 100%; border: 1px solid var(--np-line); border-radius: var(--np-r-sm); padding: 12px 15px;
	background: var(--np-white); color: var(--np-ink); font-size: var(--np-fs-3);
	transition: border-color .22s ease, box-shadow .22s ease; }
.np-form input { min-height: 48px; }
.np-form textarea { resize: vertical; min-height: 128px; }
.np-form input:focus, .np-form textarea:focus { outline: 0; border-color: var(--np-ink);
	box-shadow: 0 0 0 3px rgba(17,17,17,.08); }
.np-form__note { margin: 14px 0 0; color: var(--np-muted); font-size: var(--np-fs-1); line-height: 1.65; }

.np-goi--lh { padding: 0 0 var(--np-pad); background: transparent; color: var(--np-ink); }
.np-goi--lh p { color: var(--np-body); }
.np-goi--lh strong { color: var(--np-ink); }

@media (max-width: 1020px) {
	.np-gt { grid-template-columns: 1fr 1fr; }
	.np-lh { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
	/* Cùng quy tắc với khối biểu mẫu ở trang chủ: dưới 960px thì gọi, không gõ. */
	.np-lh__form { display: none; }
	.np-goi--lh { display: block; }
}
@media (max-width: 680px) {
	.np-gt { grid-template-columns: 1fr; }
	.np-gt__cta { padding: 28px 22px; }
}

/* =====================================================================
 * MÀN HÌNH HẸP
 * ===================================================================== */
@media (max-width: 1180px) {
	.np-search { display: none; }
	.np-nav ul { gap: 20px; }
}
@media (max-width: 1000px) {
	.np-head__row { grid-template-columns: 1fr auto; }
	.np-burger { display: inline-flex; }
	.np-nav { position: absolute; inset: 100% 0 auto; display: none; padding: 10px var(--np-gut) 18px;
		border-bottom: 1px solid var(--np-line); background: var(--np-white);
		box-shadow: 0 18px 32px -22px rgba(17,17,17,.5); }
	/* Chỉ chạy lúc mở. Đóng thì ẩn ngay, vì `display: none` cắt mọi chuyển cảnh. */
	.np-nav.is-open { display: block; animation: np-drop .28s cubic-bezier(.22,.8,.3,1) both; }
	@keyframes np-drop { from { opacity: 0; transform: translateY(-9px); } to { opacity: 1; transform: translateY(0); } }
	.np-nav ul { display: grid; gap: 0; }
	.np-nav a { display: block; padding: 12px 2px; border-bottom: 1px solid var(--np-line); }
	.np-nav a::after { display: none; }
	.np-foot__grid { grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; }
	.np-foot__news { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
	.np-head__row { min-height: 70px; gap: 12px; }
	.np-brand__mark { width: 36px; height: 36px; }
	.np-brand__name { font-size: var(--np-fs-4); }
	.np-cart__label { display: none; }
	.np-bar a { display: none; }
	.np-bar__in { min-height: 34px; font-size: var(--np-fs-1); }
	.np-foot__grid { grid-template-columns: 1fr 1fr; gap: 34px 20px; padding: 48px 0 36px; }
	.np-foot__brand { grid-column: 1 / -1; }
	/* Cùng quy tắc với biểu mẫu ở trang chủ và trang liên hệ: trên điện thoại
	   không bắt khách gõ email. Giấu cả cột cho gọn — để lại mỗi tiêu đề
	   "Nhận bản tin" mà không có ô nhập thì chẳng để làm gì. */
	.np-foot__news { display: none; }
	.np-foot__bot .np-wrap { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* =====================================================================
 * VIỀN TIÊU ĐIỂM BÀN PHÍM — mọi phần tử bấm được.
 *
 * `:focus-visible` chứ không `:focus`, nên chuột không thấy viền nhảy ra sau
 * mỗi lần bấm. Hai lớp (`body.np-shop` + `:focus-visible`) để thắng các luật
 * `outline: 0` mà mẫu này khai cho ô nhập. Trên khối nền tối viền đổi sang
 * trắng — cam đất trên nền đen gần như không thấy.
 * ===================================================================== */
body.np-shop :is(a, button, summary, [tabindex="0"]):focus-visible,
body.np-shop :is(input, select, textarea):focus-visible {
	outline: 2px solid var(--np-accent); outline-offset: 3px; border-radius: var(--np-r-sm); }
/* Nút hình viên thuốc giữ bo góc tròn của chính nó, không bị vuông lại. */
body.np-shop :is(.np-btn, .np-chip, .np-cart, a.button, button.button, input.button, .np-quick span,
	.woocommerce-pagination a, .woocommerce-pagination span, .np-sub__go):focus-visible {
	border-radius: 999px; }
body.np-shop :is(.np-foot, .np-dangky, .np-goi, .np-bar, .np-hero, .np-gt__cta) :is(a, button, input):focus-visible {
	outline-color: var(--np-white); }
/* Liên kết bỏ qua: đã hiện ra thì viền phải ôm đúng hình viên thuốc của nó. */
.np-skip:focus-visible { outline: 2px solid var(--np-accent); outline-offset: 3px; }
/* Ô sắp xếp của WooCommerce trước đây không có trạng thái tiêu điểm nào. */
body.np-shop .woocommerce-ordering select:focus-visible,
body.np-shop .np-shop__sort select:focus-visible { border-color: var(--np-ink); }

/* =====================================================================
 * BA TRANG HAY BỊ BỎ QUÊN — giỏ rỗng, lọc rỗng, 404.
 *
 * Cả ba đều do thứ khác vẽ chứ không phải mẫu trang của theme, nên cả ba đều
 * rớt tương phản: 404 dùng `.vs-btn` của theme mẹ (nút xanh #1E5AA8 + chữ mực
 * #111 ≈ 2,5:1) mà CSS theme mẹ đã bị gỡ; giỏ rỗng dựng bằng *block* lấy màu
 * từ `theme.json` (cũng xanh #1E5AA8 + chữ #201D1A). Đã thêm `404.php` riêng
 * và khai lại màu nút khối bên dưới. Số đo đầy đủ ở README.
 * ===================================================================== */

/* --- Khối trạng thái rỗng dùng chung (lọc rỗng, 404) --- */
.np-trong { display: grid; justify-items: center; gap: var(--np-s-4);
	margin: var(--np-s-2) 0 0; padding: var(--np-s-8) var(--np-s-5);
	border: 1px solid var(--np-line); border-radius: var(--np-r);
	background: var(--np-soft); text-align: center; }
/* Cam đất SẪM: trên nền `--np-soft`, `--np-accent` chỉ 3,77:1 còn
   `--np-accent-dark` lên 4,9:1 — đạt cả ngưỡng chữ, khỏi phải giải thích. */
.np-trong__hinh { width: 56px; height: 56px; color: var(--np-accent-dark); }
.np-trong__hinh svg { width: 100%; height: 100%; }
/* Hai lớp cho tiêu đề: theme mẹ khai `body.np-shop h1 { color: inherit }` với
   độ ưu tiên cao hơn một lớp, nên `.np-trong h1` một mình bị thua và tiêu đề ra
   màu chữ nội dung (xám 95) thay vì màu mực. */
body.np-shop .np-trong :is(h1, h2) { color: var(--np-ink); font-size: var(--np-fs-6); font-weight: 700; }
.np-trong p { max-width: 46ch; margin: 0; color: var(--np-body); font-size: var(--np-fs-3); }
.np-trong p strong { color: var(--np-ink); }
/* Hộp thông báo của WooCommerce trên trang tìm kiếm cũng thôi — mẫu trang đã
   không gọi `woocommerce_no_products_found` nữa, luật này chỉ để chắc tay nếu
   một plugin khác in lại hộp ấy. */
body.np-shop .woocommerce-no-products-found { display: none; }
.np-trong__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--np-s-3);
	margin-top: var(--np-s-2); }
/* Hộp thông báo rỗng mà WooCommerce in kèm khi không có sản phẩm nào — khối
   bên trên đã nói đủ, để cả hai thì có một hộp trống không chữ. */
body.np-shop .woocommerce-no-products-found .woocommerce-info:empty { display: none; }

/* --- Trang 404 --- */
.np-404 { padding: var(--np-pad) 0; }
.np-404 .np-trong { padding: var(--np-s-8) var(--np-s-5); }
.np-404__tim { width: min(420px, 100%); display: flex; gap: var(--np-s-2); margin-top: var(--np-s-2); }
.np-404__tim input { flex: 1 1 auto; min-width: 0; min-height: 48px;
	border: 1px solid var(--np-line); border-radius: 999px; padding: 0 var(--np-s-5);
	background: var(--np-white); color: var(--np-ink); font-size: var(--np-fs-3);
	transition: border-color var(--np-t-fast) ease, box-shadow var(--np-t-fast) ease; }
.np-404__tim input:focus { outline: 0; border-color: var(--np-ink);
	box-shadow: 0 0 0 3px rgba(17, 17, 17, .08); }
.np-404__tim .np-btn { flex: none; }

/* --- Giỏ hàng rỗng và các khối WooCommerce ---
   Nút của *block* không mang lớp `.button`, nên bộ chọn nút ở phần CỬA HÀNG
   không bắt được. Liệt kê đủ ba họ lớp mà WooCommerce dùng. */
body.np-shop :is(.wp-block-woocommerce-cart, .wp-block-woocommerce-checkout,
	.wp-block-woocommerce-empty-cart-block, .wc-block-grid, .wp-block-woocommerce-product-new)
	:is(.wp-block-button__link, .wp-element-button, .add_to_cart_button, .wc-block-components-product-button a) {
	border: 1px solid var(--np-ink) !important; border-radius: 999px !important;
	background: var(--np-ink) !important; color: var(--np-white) !important;
	font-size: var(--np-fs-2) !important; font-weight: 600 !important; white-space: nowrap;
	transition: background var(--np-t-fast) ease, border-color var(--np-t-fast) ease,
		transform var(--np-t-fast) var(--np-ease); }
body.np-shop :is(.wp-block-woocommerce-cart, .wp-block-woocommerce-checkout,
	.wp-block-woocommerce-empty-cart-block, .wc-block-grid, .wp-block-woocommerce-product-new)
	:is(.wp-block-button__link, .wp-element-button, .add_to_cart_button, .wc-block-components-product-button a):hover {
	background: var(--np-accent) !important; border-color: var(--np-accent) !important;
	transform: translateY(-2px); }

/* Tiêu đề và liên kết của khối giỏ rỗng: màu mực của mẫu, không phải màu khối. */
body.np-shop .wc-block-cart__empty-cart__title { color: var(--np-ink); font-size: var(--np-fs-6); font-weight: 700; }
body.np-shop .wp-block-woocommerce-empty-cart-block > p a { color: var(--np-accent);
	font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
body.np-shop .wp-block-woocommerce-empty-cart-block h2:not(.wc-block-cart__empty-cart__title) {
	color: var(--np-ink); font-size: var(--np-fs-4); font-weight: 600; }
/* Ô nhập trong khối giỏ hàng và thanh toán cũng phải có trạng thái tiêu điểm. */
body.np-shop .wc-block-components-text-input input:focus-visible,
body.np-shop .wc-block-components-text-input input:focus {
	outline: 2px solid var(--np-accent); outline-offset: 2px; }

/* =====================================================================
 * BA ĐƯỜNG DỰ PHÒNG — đường thứ 2.
 *
 * Ai xin bớt chuyển động thì không thấy gì chạy VÀ phải thấy đủ nội dung. Hai
 * việc, không phải một: chỉ rút thời lượng về 0,01ms thì luật giấu vẫn còn
 * hiệu lực và phần tử ở lại ẩn nếu IO không chạy. Phải tắt hẳn luật giấu.
 * ===================================================================== */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important;
		animation-delay: 0ms !important; transition-delay: 0ms !important; }

	/* Tắt hẳn ba luật giấu, không phụ thuộc vào kịch bản hay observer nào. */
	html.np-js [data-np-rise] > * { opacity: 1 !important; translate: none !important; }
	html.np-js [data-np-cur]::before { translate: 0 -101% !important; }
	html.np-js [data-np-cur] img { scale: 1 !important; }
	html.np-js [data-np-ve] .np-ve__net { stroke-dashoffset: 0 !important; }
	html.np-js [data-np-ve] .np-ve__tron { scale: 1 !important; }
}
