/*
Theme Name: Nắng Nhỏ — Mẫu website trường mầm non
Theme URI: https://truonghoc-mau-01.mauwebsitedep.net/
Description: Mẫu website trường mầm non tư thục (truonghoc-mau-01). Theme con của vinasite, chạy WooCommerce ở chế độ danh mục — chương trình học không bán qua giỏ hàng.
Author: VinaSite
Author URI: https://vinasite.com.vn/
Template: vinasite
Version: 1.0.0
Text Domain: truonghoc-mau-01
*/

/* =====================================================================
 * 1. BIẾN
 *
 * Vàng kem và xanh lá non ĐỀU LÀ MÀU SÁNG. Chữ trắng đặt trên chúng rớt
 * xuống dưới 4,5:1, nên mọi chữ trên nền vàng/xanh non trong theme này là
 * chữ TỐI (--th1-muc). Chữ trắng chỉ dùng trên hai màu đậm: --th1-la-dam
 * (5,0:1) và --th1-tham (13,2:1).
 * ===================================================================== */
:root {
	--th1-nen:      #FFFCF4;   /* nền trang */
	--th1-kem:      #FFF4DC;   /* khối nhấn kem */
	--th1-kem-sau:  #FDEBC4;   /* kem đậm hơn một bậc */
	--th1-trang:    #FFFFFF;
	--th1-vang:     #FFC94D;   /* vàng nhấn — chỉ đặt chữ tối lên */
	--th1-la:       #AEDD76;   /* xanh lá non — chỉ đặt chữ tối lên */
	--th1-la-nhat:  #E8F5D6;
	--th1-la-dam:   #3E7A24;   /* nút, liên kết, chữ trắng đặt được */
	--th1-tham:     #26371B;   /* chân trang */
	--th1-muc:      #2C2A1E;   /* chữ chính */
	--th1-xam:      #5E5A4A;   /* chữ phụ — 6,7:1 trên nền trang */
	--th1-ke:       #EFE4CA;   /* đường kẻ mảnh */

	/* Thang chữ — ĐÚNG SÁU BẬC, không có cỡ nào ngoài thang. */
	--th1-fs-1: 13px;
	--th1-fs-2: 15px;
	--th1-fs-3: 17px;
	--th1-fs-4: clamp(20px, 1.5vw, 22px);
	--th1-fs-5: clamp(26px, 3vw, 36px);
	--th1-fs-6: clamp(34px, 5vw, 54px);

	/* Thang khoảng cách — bước 4px, không có số lẻ tuỳ hứng. */
	--th1-s-1: 4px;
	--th1-s-2: 8px;
	--th1-s-3: 12px;
	--th1-s-4: 16px;
	--th1-s-5: 24px;
	--th1-s-6: 32px;
	--th1-s-7: 48px;
	--th1-s-8: 72px;

	--th1-r-s:    10px;
	--th1-r-m:    18px;
	--th1-r-l:    28px;
	--th1-r-pill: 999px;

	--th1-bong:   0 2px 10px rgba(44, 42, 30, .06);
	--th1-bong-l: 0 10px 28px rgba(44, 42, 30, .10);

	/* Một đường cong duy nhất cho mọi chuyển động, không dùng `linear`. */
	--th1-cong: cubic-bezier(.2, .7, .3, 1);
}

/* =====================================================================
 * 2. NỀN TẢNG
 * ===================================================================== */
body.th1-truong {
	margin: 0;
	background: var(--th1-nen);
	color: var(--th1-muc);
	font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
	font-size: var(--th1-fs-3);
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

/*
 * Theme mẹ có luật riêng cho h1–h3 trong nội dung và nhuộm chúng xanh dương;
 * luật ấy thắng mọi khai báo một lớp. Khai với HAI lớp thì vừa thắng được, vừa
 * để tiêu đề tự đúng màu trong cả khối nền sáng lẫn nền tối — không phải liệt
 * kê từng ngoại lệ.
 */
body.th1-truong h1,
body.th1-truong h2,
body.th1-truong h3,
body.th1-truong h4 {
	color: inherit;
	font-family: "Baloo 2", "Nunito", system-ui, sans-serif;
	font-weight: 600;
	line-height: 1.2;
	margin: 0 0 var(--th1-s-4);
	letter-spacing: -.005em;
}

body.th1-truong h1 { font-size: var(--th1-fs-6); }
body.th1-truong h2 { font-size: var(--th1-fs-5); }
body.th1-truong h3 { font-size: var(--th1-fs-4); }
body.th1-truong h4 { font-size: var(--th1-fs-3); }

body.th1-truong p { margin: 0 0 var(--th1-s-4); }
/*
 * Màu liên kết mặc định bọc trong `:where()`: bộ chọn ấy KHÔNG cộng độ ưu
 * tiên, nên mọi luật sau này chỉ cần một lớp là thắng được.
 *
 * Không bọc thì `body.th1-truong a` (0,1,2) đè cả `.th1-nut` (0,1,0),
 * `.th1-the`, `.th1-chip` và `.th1-foot a` — đã gặp thật: chữ trên nút nền
 * xanh đậm ra đúng màu nền nên nút trông như rỗng, và liên kết chân trang ra
 * xanh đậm trên nền thẫm, rớt tương phản.
 */
:where(body.th1-truong a) { color: var(--th1-la-dam); }
body.th1-truong img { max-width: 100%; height: auto; }

.th1-wrap {
	width: min(1220px, 100% - var(--th1-s-6));
	margin-inline: auto;
}

.th1-skip {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--th1-tham);
	color: #fff;
	padding: var(--th1-s-3) var(--th1-s-5);
	border-radius: 0 0 var(--th1-r-s) 0;
	z-index: 100;
}
.th1-skip:focus { left: 0; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden; clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/* Nhãn nhỏ trên đầu mỗi khối. */
.th1-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: var(--th1-s-2);
	font-size: var(--th1-fs-1);
	font-weight: 800;
	letter-spacing: .13em;
	text-transform: uppercase;
	color: var(--th1-la-dam);
	margin-bottom: var(--th1-s-3);
}
.th1-eyebrow::before {
	content: "";
	width: 22px; height: 3px;
	border-radius: var(--th1-r-pill);
	background: var(--th1-vang);
}

.th1-lead {
	font-size: var(--th1-fs-3);
	color: var(--th1-xam);
	max-width: 62ch;
}

/* ── Nút ───────────────────────────────────────────────────────────── */
body.th1-truong .th1-nut,
body.th1-truong .woocommerce a.button,
body.th1-truong .woocommerce button.button,
body.th1-truong .wp-block-button__link,
body.th1-truong .wc-block-components-button,
body.th1-truong .wc-block-cart__submit-button,
body.th1-truong .wc-block-components-checkout-place-order-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--th1-s-2);
	padding: var(--th1-s-3) var(--th1-s-5);
	border: 2px solid transparent;
	border-radius: var(--th1-r-pill);
	background: var(--th1-la-dam);
	color: #fff;
	font-family: inherit;
	font-size: var(--th1-fs-2);
	font-weight: 800;
	line-height: 1.4;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	/* Chỉ transform và opacity — không đụng tới thuộc tính bố cục. */
	transition: transform .2s var(--th1-cong), background-color .2s var(--th1-cong),
	            box-shadow .2s var(--th1-cong);
}

body.th1-truong .th1-nut:hover,
body.th1-truong .woocommerce a.button:hover,
body.th1-truong .woocommerce button.button:hover,
body.th1-truong .wp-block-button__link:hover,
body.th1-truong .wc-block-components-button:hover {
	background: #33661C;
	color: #fff;
	transform: translateY(-2px);
	box-shadow: var(--th1-bong-l);
}

/* Phản hồi khi bấm: nút lún nhẹ. */
body.th1-truong .th1-nut:active,
body.th1-truong .woocommerce a.button:active,
body.th1-truong .woocommerce button.button:active {
	transform: translateY(1px) scale(.985);
	box-shadow: none;
}

body.th1-truong .th1-nut--vang {
	background: var(--th1-vang);
	color: var(--th1-muc);   /* vàng là màu sáng — chữ phải tối */
}
body.th1-truong .th1-nut--vang:hover { background: #FFBB22; color: var(--th1-muc); }

body.th1-truong .th1-nut--vien {
	background: transparent;
	border-color: var(--th1-la-dam);
	color: var(--th1-la-dam);
}
body.th1-truong .th1-nut--vien:hover {
	background: var(--th1-la-dam);
	color: #fff;
}

/*
 * Mọi liên kết trong khối nền thẫm phải là chữ trắng.
 *
 * Màu liên kết mặc định là xanh lá đậm — trên nền `--th1-tham` nó chỉ còn
 * khoảng 1,4:1, gần như không đọc được. `:not(.th1-nut)` để nút giữ màu nền
 * của chính nó.
 */
body.th1-truong .th1-tren-tham a:not(.th1-nut) {
	color: #fff;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Trên nền đậm, nút viền đổi sang trắng — xanh đậm trên nền thẫm không thấy. */
body.th1-truong .th1-tren-tham .th1-nut--vien {
	border-color: rgba(255, 255, 255, .65);
	color: #fff;
}
body.th1-truong .th1-tren-tham .th1-nut--vien:hover {
	background: #fff;
	color: var(--th1-tham);
	border-color: #fff;
}

/* =====================================================================
 * 3. CHUYỂN ĐỘNG THEO CUỘN
 *
 * BỘ CHỌN KHAI Ở HAI NƠI — bốn bộ chọn dưới đây và hằng SEL / SEL_VE /
 * SEL_DEM / SEL_NGAY ở đầu `assets/site.js`. Phải khớp từng chữ: lệch là có
 * phần tử CSS giấu mà kịch bản không bao giờ gọi hiện ra.
 *
 * BA ĐƯỜNG DỰ PHÒNG:
 *   1. lớp `th1-js` — gắn nội tuyến trong <head> (header.php). CSS chỉ giấu
 *      khi có lớp này, nên tắt JavaScript là trang hiện đủ nội dung.
 *   2. `prefers-reduced-motion: reduce` — ngay bên dưới, tắt hẳn luật giấu.
 *   3. lớp `th1-show-all` — hẹn giờ 2,5s trong <head> gắn vào nếu
 *      IntersectionObserver chưa kích hoạt lần nào.
 *
 * Hiệu ứng cuộn dùng `translate` RIÊNG chứ không ghi vào `transform`: hiệu ứng
 * rê chuột đã chiếm `transform`, hai thứ cùng ghi một thuộc tính thì thẻ vừa
 * hiện ra sẽ nâng lên theo nhịp 700ms của hiện-dần thay vì 200ms của rê chuột.
 * Hai thuộc tính riêng thì trình duyệt tự cộng lại.
 * ===================================================================== */
.th1-js:not(.th1-show-all) [data-th1-rise] > *,
.th1-js:not(.th1-show-all) [data-th1-ve],
.th1-js:not(.th1-show-all) [data-th1-dem],
.th1-js:not(.th1-show-all) [data-th1-ngay] {
	opacity: 0;
	translate: 0 20px;
	transition: opacity .7s var(--th1-cong), translate .7s var(--th1-cong);
}

.th1-js [data-th1-rise] > *.is-in,
.th1-js [data-th1-ve].is-in,
.th1-js [data-th1-dem].is-in,
.th1-js [data-th1-ngay].is-in {
	opacity: 1;
	translate: 0 0;
}

/* Lệch nhịp 80ms giữa các phần tử cùng hàng. */
.th1-js [data-th1-rise] > *:nth-child(2)  { transition-delay: .08s; }
.th1-js [data-th1-rise] > *:nth-child(3)  { transition-delay: .16s; }
.th1-js [data-th1-rise] > *:nth-child(4)  { transition-delay: .24s; }
.th1-js [data-th1-rise] > *:nth-child(5)  { transition-delay: .32s; }
.th1-js [data-th1-rise] > *:nth-child(6)  { transition-delay: .40s; }
.th1-js [data-th1-rise] > *:nth-child(7)  { transition-delay: .08s; }
.th1-js [data-th1-rise] > *:nth-child(8)  { transition-delay: .16s; }
.th1-js [data-th1-rise] > *:nth-child(9)  { transition-delay: .24s; }
.th1-js [data-th1-rise] > *:nth-child(10) { transition-delay: .32s; }
.th1-js [data-th1-rise] > *:nth-child(11) { transition-delay: .40s; }
.th1-js [data-th1-rise] > *:nth-child(12) { transition-delay: .08s; }

/*
 * ĐƯỜNG DỰ PHÒNG 2. Đặt sau mọi luật giấu để thắng không cần !important.
 * Thời lượng 0,01ms chứ không phải 0: vài trình duyệt bỏ qua sự kiện
 * `transitionend` khi thời lượng đúng bằng 0.
 */
@media (prefers-reduced-motion: reduce) {
	.th1-js [data-th1-rise] > *,
	.th1-js [data-th1-ve],
	.th1-js [data-th1-dem],
	.th1-js [data-th1-ngay] {
		opacity: 1 !important;
		translate: none !important;
		transition-duration: .01ms !important;
		transition-delay: 0ms !important;
	}
	body.th1-truong *,
	body.th1-truong *::before,
	body.th1-truong *::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
		scroll-behavior: auto !important;
	}
}

/* =====================================================================
 * 4. ĐẦU TRANG — bốn trạng thái, CHIỀU CAO GIỮ NGUYÊN ở cả bốn
 *
 * Phần tử `position: sticky` vẫn chiếm chỗ trong dòng chảy, nên thu chiều cao
 * lúc đang cuộn là kéo cả trang bên dưới nhích lên một nhịp thấy rõ — và
 * animate `height` là thứ chuẩn chung cấm thẳng. Chuẩn xin "thu gọn khi cuộn
 * xuống"; ở đây hiểu là TRƯỢT CẢ THANH đi bằng `transform`.
 *
 * KHÔNG có biểu tượng giỏ hàng ở đầu trang. Trường học không bán qua giỏ —
 * xem chú thích đầu `inc/shop.php`.
 * ===================================================================== */
.th1-head {
	position: sticky;
	top: 0;
	z-index: 60;
	background: rgba(255, 252, 244, .86);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid transparent;
	transition: transform .3s var(--th1-cong), background-color .3s var(--th1-cong),
	            box-shadow .3s var(--th1-cong), border-color .3s var(--th1-cong);
}
.th1-head.is-stuck {
	background: rgba(255, 252, 244, .96);
	box-shadow: var(--th1-bong);
}
.th1-head.is-past {
	background: var(--th1-trang);
	border-bottom-color: var(--th1-ke);
	box-shadow: var(--th1-bong-l);
}
.th1-head.is-hidden { transform: translateY(-100%); }

.th1-head__row {
	display: flex;
	align-items: center;
	gap: var(--th1-s-5);
	min-height: 86px;
}

.th1-brand {
	display: flex;
	align-items: center;
	gap: var(--th1-s-3);
	text-decoration: none;
	color: var(--th1-muc);
	flex: 0 0 auto;
}
.th1-brand__mark { display: flex; }
.th1-brand__mark svg { transition: transform .3s var(--th1-cong); }
.th1-brand:hover .th1-brand__mark svg { transform: rotate(-12deg); }
.th1-brand__text { display: flex; flex-direction: column; }
.th1-brand__name {
	font-family: "Baloo 2", sans-serif;
	font-size: var(--th1-fs-4);
	font-weight: 700;
	line-height: 1.1;
}
.th1-brand__tag {
	font-size: var(--th1-fs-1);
	font-weight: 700;
	letter-spacing: .1em;
	color: var(--th1-xam);
	/* Mờ dần chứ KHÔNG thu `max-height`: thu chiều cao là animate bố cục. */
	transition: opacity .25s var(--th1-cong);
}
.th1-head.is-stuck .th1-brand__tag { opacity: 0; }

.th1-nav { margin-left: auto; }
.th1-nav ul {
	display: flex;
	align-items: center;
	gap: var(--th1-s-5);
	list-style: none;
	margin: 0;
	padding: 0;
}
.th1-nav a {
	position: relative;
	display: block;
	white-space: nowrap;
	padding: var(--th1-s-2) 0;
	color: var(--th1-muc);
	font-size: var(--th1-fs-2);
	font-weight: 700;
	text-decoration: none;
}
/* Gạch chân vẽ ra từ giữa — `transform` nên không tính lại bố cục. */
.th1-nav a::after {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: 0;
	height: 3px;
	border-radius: var(--th1-r-pill);
	background: var(--th1-vang);
	transform: scaleX(0);
	transition: transform .22s var(--th1-cong);
}
.th1-nav a:hover::after,
.th1-nav a[aria-current="page"]::after { transform: scaleX(1); }

.th1-tools {
	display: flex;
	align-items: center;
	gap: var(--th1-s-3);
	flex: 0 0 auto;
}

.th1-goi {
	display: inline-flex;
	align-items: center;
	gap: var(--th1-s-2);
	font-size: var(--th1-fs-2);
	font-weight: 800;
	color: var(--th1-la-dam);
	text-decoration: none;
	white-space: nowrap;
}
.th1-goi svg { width: 18px; height: 18px; flex: 0 0 auto; }
.th1-goi:hover { text-decoration: underline; }

.th1-burger {
	display: none;
	width: 44px; height: 44px;
	padding: 0;
	border: 1px solid var(--th1-ke);
	border-radius: var(--th1-r-s);
	background: var(--th1-trang);
	cursor: pointer;
}
.th1-burger span[aria-hidden] {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 5px;
}
.th1-burger i {
	display: block;
	width: 20px; height: 2px;
	border-radius: 2px;
	background: var(--th1-muc);
	transition: transform .22s var(--th1-cong), opacity .22s var(--th1-cong);
}
.th1-burger[aria-expanded="true"] i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.th1-burger[aria-expanded="true"] i:nth-child(2) { opacity: 0; }
.th1-burger[aria-expanded="true"] i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =====================================================================
 * 5. HERO
 *
 * KHÔNG áp hiệu ứng ẩn/hiện cho hero. Ẩn hero là đẩy lùi LCP. Bốn dòng chữ
 * dưới đây bắt đầu ở `opacity: 1` và chỉ TRƯỢT vào chỗ; ảnh nền cũng hiện ngay
 * rồi zoom rất chậm từ 1.06 về 1 trong 14 giây.
 * ===================================================================== */
.th1-hero {
	position: relative;
	overflow: hidden;
	background: var(--th1-kem);
}
.th1-hero__grid {
	display: grid;
	grid-template-columns: 1.05fr .95fr;
	gap: var(--th1-s-8);
	align-items: center;
	padding-block: var(--th1-s-8);
}
.th1-hero__text { position: relative; z-index: 2; }
.th1-hero h1 { margin-bottom: var(--th1-s-4); }
.th1-hero__sub {
	font-size: var(--th1-fs-3);
	color: var(--th1-xam);
	max-width: 48ch;
	margin-bottom: var(--th1-s-6);
}
.th1-hero__nut { display: flex; flex-wrap: wrap; gap: var(--th1-s-3); }

/* Hero vào trang — trượt lên, lệch nhịp 80ms mỗi dòng. */
.th1-js .th1-vao { animation: th1-vao .7s var(--th1-cong) both; }
.th1-js .th1-vao:nth-child(1) { animation-delay: .05s; }
.th1-js .th1-vao:nth-child(2) { animation-delay: .13s; }
.th1-js .th1-vao:nth-child(3) { animation-delay: .21s; }
.th1-js .th1-vao:nth-child(4) { animation-delay: .29s; }

@keyframes th1-vao {
	from { transform: translateY(18px); }
	to   { transform: none; }
}

.th1-hero__media {
	position: relative;
	border-radius: var(--th1-r-l);
	overflow: hidden;
	box-shadow: var(--th1-bong-l);
	/* Tỉ lệ cố định: ảnh không nhảy, CLS giữ ở 0. */
	aspect-ratio: 4 / 3;
}
.th1-hero__media img {
	width: 100%; height: 100%;
	object-fit: cover;
	display: block;
}
.th1-js .th1-hero__media img { animation: th1-zoom 14s var(--th1-cong) both; }
@keyframes th1-zoom {
	from { transform: scale(1.06); }
	to   { transform: scale(1); }
}

/*
 * Chuyển động riêng theo chủ đề: ba bong bóng trôi rất chậm phía sau hero.
 * Chuyển động vô hạn chỉ được đặt ở trang trí trong hero, không đặt ở khu vực
 * đọc nội dung — đúng mục 2 của chuẩn chung.
 */
.th1-bong-bay {
	position: absolute;
	border-radius: 50%;
	pointer-events: none;
	opacity: .5;
}
.th1-bong-bay--1 { width: 120px; height: 120px; left: 4%;  top: 14%; background: var(--th1-la-nhat); }
.th1-bong-bay--2 { width: 70px;  height: 70px;  left: 46%; top: 72%; background: var(--th1-vang); opacity: .32; }
.th1-bong-bay--3 { width: 170px; height: 170px; right: 42%; top: 4%; background: var(--th1-kem-sau); }
.th1-js .th1-bong-bay { animation: th1-troi 11s var(--th1-cong) infinite alternate; }
.th1-js .th1-bong-bay--2 { animation-duration: 8s;  animation-delay: -3s; }
.th1-js .th1-bong-bay--3 { animation-duration: 14s; animation-delay: -6s; }
@keyframes th1-troi {
	from { transform: translate3d(0, 0, 0) scale(1); }
	to   { transform: translate3d(14px, -22px, 0) scale(1.07); }
}

/* =====================================================================
 * 6. KHỐI TRANG CHỦ
 * ===================================================================== */
.th1-khoi { padding-block: var(--th1-s-8); }
.th1-khoi--kem { background: var(--th1-kem); }
.th1-khoi--la  { background: var(--th1-la-nhat); }

.th1-khoi__dau {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: var(--th1-s-5);
	margin-bottom: var(--th1-s-7);
	flex-wrap: wrap;
}
.th1-khoi__dau h2 { margin-bottom: var(--th1-s-2); }

/* ── Dải số đếm lên ────────────────────────────────────────────────── */
.th1-dem {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--th1-s-5);
	padding: var(--th1-s-6);
	background: var(--th1-trang);
	border: 1px solid var(--th1-ke);
	border-radius: var(--th1-r-l);
	box-shadow: var(--th1-bong);
	text-align: center;
}
.th1-dem__o strong {
	display: block;
	font-family: "Baloo 2", sans-serif;
	font-size: var(--th1-fs-5);
	font-weight: 700;
	color: var(--th1-la-dam);
	line-height: 1.1;
	/* Khung số rộng cố định theo ch: số chạy từ 0 lên không làm cột co giãn. */
	font-variant-numeric: tabular-nums;
}
.th1-dem__o span {
	display: block;
	font-size: var(--th1-fs-2);
	color: var(--th1-xam);
}
.th1-dem__ghi {
	grid-column: 1 / -1;
	font-size: var(--th1-fs-1);
	color: var(--th1-xam);
	margin: 0;
}

/* ── Thẻ nhóm độ tuổi ──────────────────────────────────────────────── */
.th1-luoi-4 {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: var(--th1-s-5);
}
.th1-luoi-3 {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--th1-s-5);
}

.th1-the {
	display: flex;
	flex-direction: column;
	background: var(--th1-trang);
	border: 1px solid var(--th1-ke);
	border-radius: var(--th1-r-l);
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	transition: transform .22s var(--th1-cong), box-shadow .22s var(--th1-cong);
}
.th1-the:hover { transform: translateY(-5px); box-shadow: var(--th1-bong-l); }

.th1-the__anh {
	position: relative;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--th1-kem);
}
.th1-the__anh img {
	width: 100%; height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .35s var(--th1-cong);
}
.th1-the:hover .th1-the__anh img { transform: scale(1.05); }

.th1-the__than {
	padding: var(--th1-s-5);
	display: flex;
	flex-direction: column;
	gap: var(--th1-s-2);
	flex: 1;
}
.th1-the__than h3 { margin: 0; }
.th1-the__than p { margin: 0; font-size: var(--th1-fs-2); color: var(--th1-xam); }
.th1-the__xem {
	margin-top: auto;
	padding-top: var(--th1-s-3);
	font-size: var(--th1-fs-2);
	font-weight: 800;
	color: var(--th1-la-dam);
	display: inline-flex;
	align-items: center;
	gap: var(--th1-s-2);
}
.th1-the__xem svg { width: 16px; height: 16px; transition: transform .22s var(--th1-cong); }
.th1-the:hover .th1-the__xem svg { transform: translateX(4px); }

.th1-nhan-tuoi {
	position: absolute;
	left: var(--th1-s-3);
	top: var(--th1-s-3);
	padding: var(--th1-s-1) var(--th1-s-3);
	border-radius: var(--th1-r-pill);
	background: var(--th1-vang);
	color: var(--th1-muc);        /* vàng sáng — chữ tối */
	font-size: var(--th1-fs-1);
	font-weight: 800;
}

/* ── Một ngày của bé ───────────────────────────────────────────────── */
.th1-ngay { position: relative; }
.th1-ngay__duong {
	display: block;
	width: 100%;
	height: 56px;
	margin-bottom: var(--th1-s-5);
	overflow: visible;
}
/*
 * Nét vẽ dần: đường cong và mặt trời chạy dọc theo nó. `stroke-dashoffset`
 * không phải thuộc tính bố cục nên vẽ nó không buộc tính lại trang.
 */
.th1-ngay__net {
	stroke-dasharray: 1200;
	stroke-dashoffset: 1200;
	transition: stroke-dashoffset 1.6s var(--th1-cong);
}
.th1-ngay.is-in .th1-ngay__net { stroke-dashoffset: 0; }

.th1-ngay__mt { transform: translateX(0); transition: transform 1.6s var(--th1-cong); }
/* Đơn vị ở đây là đơn vị của lưới SVG (viewBox 0 0 1200 56), không phải pixel
   màn hình — mặt trời đi từ x=40 tới gần x=1160. */
.th1-ngay.is-in .th1-ngay__mt { transform: translateX(1120px); }

.th1-gio {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: var(--th1-s-4);
	list-style: none;
	margin: 0;
	padding: 0;
}
.th1-gio li {
	background: var(--th1-trang);
	border: 1px solid var(--th1-ke);
	border-radius: var(--th1-r-m);
	padding: var(--th1-s-4);
	transition: transform .22s var(--th1-cong), box-shadow .22s var(--th1-cong);
}
.th1-gio li:hover { transform: translateY(-4px); box-shadow: var(--th1-bong); }
.th1-gio time {
	display: inline-block;
	font-family: "Baloo 2", sans-serif;
	font-size: var(--th1-fs-4);
	font-weight: 700;
	color: var(--th1-la-dam);
	margin-bottom: var(--th1-s-1);
}
.th1-gio strong { display: block; font-size: var(--th1-fs-2); }
.th1-gio span { display: block; font-size: var(--th1-fs-2); color: var(--th1-xam); }

/* ── Cơ sở vật chất ────────────────────────────────────────────────── */
.th1-csvc__o {
	position: relative;
	border-radius: var(--th1-r-l);
	overflow: hidden;
	aspect-ratio: 4 / 3;
}
.th1-csvc__o img {
	width: 100%; height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .4s var(--th1-cong);
}
.th1-csvc__o:hover img { transform: scale(1.05); }
.th1-csvc__chu {
	position: absolute;
	left: 0; right: 0; bottom: 0;
	padding: var(--th1-s-6) var(--th1-s-4) var(--th1-s-4);
	background: linear-gradient(to top, rgba(38, 55, 27, .92), rgba(38, 55, 27, 0));
	color: #fff;
}
.th1-csvc__chu strong { display: block; font-family: "Baloo 2", sans-serif; font-size: var(--th1-fs-4); }
.th1-csvc__chu span  { display: block; font-size: var(--th1-fs-2); opacity: .92; }

/* ── Thư viện ảnh: chuyển ảnh mờ chồng, không nhảy khung ───────────── */
.th1-thuvien {
	display: grid;
	grid-template-columns: 1.6fr 1fr;
	gap: var(--th1-s-5);
	align-items: start;
}
.th1-thuvien__khung {
	position: relative;
	aspect-ratio: 16 / 10;
	border-radius: var(--th1-r-l);
	overflow: hidden;
	background: var(--th1-kem);
	box-shadow: var(--th1-bong-l);
}
.th1-thuvien__khung img {
	position: absolute;
	inset: 0;
	width: 100%; height: 100%;
	object-fit: cover;
	opacity: 0;
	transition: opacity .55s var(--th1-cong);
}
/* Không JS thì ảnh đầu vẫn hiện: luật này không phụ thuộc lớp `th1-js`. */
.th1-thuvien__khung img:first-of-type,
.th1-thuvien__khung img.is-on { opacity: 1; }

.th1-thuvien__nut {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--th1-s-3);
}
.th1-thuvien__nut button {
	padding: 0;
	border: 2px solid transparent;
	border-radius: var(--th1-r-m);
	overflow: hidden;
	background: none;
	cursor: pointer;
	aspect-ratio: 4 / 3;
	transition: transform .22s var(--th1-cong), border-color .22s var(--th1-cong);
}
.th1-thuvien__nut button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.th1-thuvien__nut button:hover { transform: translateY(-3px); }
.th1-thuvien__nut button[aria-current="true"] { border-color: var(--th1-la-dam); }

.th1-thuvien__ghi {
	grid-column: 1 / -1;
	font-size: var(--th1-fs-1);
	color: var(--th1-xam);
	margin: var(--th1-s-3) 0 0;
}

/* ── Khối tuyển sinh ───────────────────────────────────────────────── */
.th1-ts {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--th1-s-8);
	align-items: center;
	padding: var(--th1-s-8) var(--th1-s-7);
	background: var(--th1-tham);
	color: #fff;
	border-radius: var(--th1-r-l);
}
.th1-ts h2 { color: #fff; }
.th1-ts p  { color: rgba(255, 255, 255, .88); }
.th1-ts .th1-eyebrow { color: var(--th1-vang); }

.th1-form {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--th1-s-4);
	background: var(--th1-trang);
	padding: var(--th1-s-6);
	border-radius: var(--th1-r-m);
	color: var(--th1-muc);
}
.th1-form p { grid-column: 1 / -1; margin: 0; }
.th1-form label {
	display: block;
	font-size: var(--th1-fs-1);
	font-weight: 800;
	margin-bottom: var(--th1-s-1);
}
.th1-form input,
.th1-form select,
.th1-form textarea {
	width: 100%;
	box-sizing: border-box;
	padding: var(--th1-s-3) var(--th1-s-4);
	border: 1px solid var(--th1-ke);
	border-radius: var(--th1-r-s);
	background: var(--th1-nen);
	font-family: inherit;
	font-size: var(--th1-fs-2);
	color: var(--th1-muc);
	transition: border-color .2s var(--th1-cong), box-shadow .2s var(--th1-cong);
}
.th1-form input:focus,
.th1-form select:focus,
.th1-form textarea:focus {
	outline: none;
	border-color: var(--th1-la-dam);
	box-shadow: 0 0 0 3px rgba(62, 122, 36, .18);
}
.th1-form__rong { grid-column: 1 / -1; }
.th1-form__ghi { font-size: var(--th1-fs-1); color: var(--th1-xam); }

/* =====================================================================
 * 7. DANH SÁCH VÀ THẺ CHƯƠNG TRÌNH (WooCommerce)
 * ===================================================================== */
.th1-page__head {
	background: var(--th1-kem);
	padding-block: var(--th1-s-7);
	border-bottom: 1px solid var(--th1-ke);
}
.th1-page__title { margin: 0; }
.th1-crumb {
	display: flex;
	flex-wrap: wrap;
	gap: var(--th1-s-2);
	font-size: var(--th1-fs-2);
	color: var(--th1-xam);
	margin-bottom: var(--th1-s-3);
}
.th1-crumb a { color: var(--th1-la-dam); text-decoration: none; }
.th1-crumb a:hover { text-decoration: underline; }

.th1-page__body { padding-block: var(--th1-s-7); }

.th1-loc {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--th1-s-3);
	margin-bottom: var(--th1-s-6);
}
.th1-chip {
	padding: var(--th1-s-2) var(--th1-s-4);
	border: 1px solid var(--th1-ke);
	border-radius: var(--th1-r-pill);
	background: var(--th1-trang);
	color: var(--th1-muc);
	font-size: var(--th1-fs-2);
	font-weight: 700;
	text-decoration: none;
	transition: transform .18s var(--th1-cong), background-color .18s var(--th1-cong);
}
.th1-chip:hover { transform: translateY(-2px); background: var(--th1-kem); color: var(--th1-muc); }
.th1-chip.is-on { background: var(--th1-la-dam); border-color: var(--th1-la-dam); color: #fff; }
.th1-sap { margin-left: auto; }
.th1-sap select {
	padding: var(--th1-s-2) var(--th1-s-4);
	border: 1px solid var(--th1-ke);
	border-radius: var(--th1-r-pill);
	background: var(--th1-trang);
	font-family: inherit;
	font-size: var(--th1-fs-2);
	color: var(--th1-muc);
}

body.th1-truong .woocommerce ul.products,
body.th1-truong ul.products {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--th1-s-5);
	margin: 0;
	padding: 0;
	list-style: none;
}
body.th1-truong ul.products::before,
body.th1-truong ul.products::after { content: none; }

body.th1-truong ul.products li.product {
	position: relative;
	display: flex;
	flex-direction: column;
	width: auto !important;
	margin: 0 !important;
	float: none !important;
	padding: 0;
	background: var(--th1-trang);
	border: 1px solid var(--th1-ke);
	border-radius: var(--th1-r-l);
	overflow: hidden;
	text-align: left;
	transition: transform .22s var(--th1-cong), box-shadow .22s var(--th1-cong);
}
body.th1-truong ul.products li.product:hover {
	transform: translateY(-5px);
	box-shadow: var(--th1-bong-l);
}

/*
 * Thẻ `<a>` của WooCommerce bọc ảnh + nhãn + tên. Biến nó thành khung ảnh có
 * tỉ lệ cố định để lưới không so le và CLS giữ ở 0.
 */
body.th1-truong ul.products li.product > a:first-of-type {
	display: block;
	text-decoration: none;
	color: inherit;
}
body.th1-truong ul.products li.product img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	margin: 0;
	transition: transform .35s var(--th1-cong);
}
body.th1-truong ul.products li.product:hover img { transform: scale(1.05); }

body.th1-truong ul.products li.product .woocommerce-loop-product__title {
	font-family: "Baloo 2", sans-serif;
	font-size: var(--th1-fs-4);
	font-weight: 600;
	padding: var(--th1-s-4) var(--th1-s-5) 0;
	margin: 0;
}
body.th1-truong ul.products li.product .th1-gia {
	display: block;
	padding: var(--th1-s-2) var(--th1-s-5) 0;
	font-size: var(--th1-fs-2);
	color: var(--th1-xam);
}
body.th1-truong ul.products li.product .th1-gia strong { color: var(--th1-la-dam); }
body.th1-truong ul.products li.product .th1-nut--dk {
	margin: var(--th1-s-4) var(--th1-s-5) var(--th1-s-5);
	align-self: flex-start;
}

.th1-nhan {
	position: absolute;
	left: var(--th1-s-3);
	top: var(--th1-s-3);
	z-index: 2;
	padding: var(--th1-s-1) var(--th1-s-3);
	border-radius: var(--th1-r-pill);
	background: var(--th1-vang);
	color: var(--th1-muc);
	font-size: var(--th1-fs-1);
	font-weight: 800;
}

/* Nhãn phụ trượt lên khi rê chuột — chỉ trên thiết bị có chuột thật. */
.th1-quick {
	position: absolute;
	left: 0; right: 0;
	top: 0;
	aspect-ratio: 4 / 3;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding-bottom: var(--th1-s-4);
	pointer-events: none;
	z-index: 2;
}
.th1-quick span {
	padding: var(--th1-s-2) var(--th1-s-4);
	border-radius: var(--th1-r-pill);
	background: rgba(255, 252, 244, .96);
	color: var(--th1-muc);
	font-size: var(--th1-fs-2);
	font-weight: 800;
	opacity: 0;
	transform: translateY(10px);
	transition: opacity .22s var(--th1-cong), transform .22s var(--th1-cong);
}
li.product:hover .th1-quick span { opacity: 1; transform: none; }
@media (hover: none) {
	.th1-quick { display: none; }
}

/* ── Trang rỗng dùng chung cho lọc rỗng và 404 ─────────────────────── */
.th1-trong {
	text-align: center;
	padding: var(--th1-s-8) var(--th1-s-5);
	background: var(--th1-kem);
	border-radius: var(--th1-r-l);
}
.th1-trong svg { margin-bottom: var(--th1-s-4); }
.th1-trong p { color: var(--th1-xam); max-width: 46ch; margin-inline: auto; }
.th1-trong__nut {
	display: flex;
	gap: var(--th1-s-3);
	justify-content: center;
	flex-wrap: wrap;
	margin-top: var(--th1-s-5);
}

/* =====================================================================
 * 8. TRANG CHI TIẾT CHƯƠNG TRÌNH
 * ===================================================================== */
.th1-sp {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--th1-s-8);
	align-items: start;
	padding-block: var(--th1-s-7);
}
.th1-sp__anh {
	border-radius: var(--th1-r-l);
	overflow: hidden;
	aspect-ratio: 4 / 3;
	background: var(--th1-kem);
	box-shadow: var(--th1-bong-l);
}
.th1-sp__anh img { width: 100%; height: 100%; object-fit: cover; display: block; }

.th1-sp__tt {
	list-style: none;
	margin: var(--th1-s-5) 0;
	padding: var(--th1-s-5);
	background: var(--th1-kem);
	border-radius: var(--th1-r-m);
	display: grid;
	gap: var(--th1-s-3);
}
.th1-sp__tt li {
	display: flex;
	justify-content: space-between;
	gap: var(--th1-s-4);
	font-size: var(--th1-fs-2);
	border-bottom: 1px solid var(--th1-kem-sau);
	padding-bottom: var(--th1-s-3);
}
.th1-sp__tt li:last-child { border-bottom: 0; padding-bottom: 0; }
.th1-sp__tt dt, .th1-sp__tt b { color: var(--th1-xam); font-weight: 700; }
.th1-sp__tt strong { font-weight: 800; text-align: right; }

.th1-sp__nut { display: flex; flex-wrap: wrap; gap: var(--th1-s-3); margin-top: var(--th1-s-5); }
.th1-sp__chu h1 { margin-bottom: var(--th1-s-3); }

/*
 * Thẻ không có ảnh (trang Giới thiệu) vẫn phải cao bằng nhau trong hàng — nếu
 * không thì lưới bốn cột trông như bị lệch chân.
 */
.th1-the--chu { height: 100%; }
.th1-luoi-3 > .th1-the,
.th1-luoi-4 > .th1-the { height: 100%; }

body.th1-truong div.product .woocommerce-tabs { padding-block: var(--th1-s-7); }
body.th1-truong div.product .woocommerce-tabs ul.tabs {
	display: flex;
	flex-wrap: wrap;
	gap: var(--th1-s-3);
	list-style: none;
	margin: 0 0 var(--th1-s-5);
	padding: 0;
}
/*
 * Phải đủ bốn phần tử + ba lớp để thắng `.woocommerce div.product .woocommerce-tabs
 * ul.tabs li` của chính WooCommerce — bộ chọn ấy đã là (0,3,3). Thiếu `div.product`
 * ở đây thì thẻ vẫn ra kiểu hộp mặc định của WooCommerce, không ra viên thuốc.
 */
body.th1-truong div.product .woocommerce-tabs ul.tabs::before,
body.th1-truong div.product .woocommerce-tabs ul.tabs::after { content: none; }
body.th1-truong div.product .woocommerce-tabs ul.tabs li::before,
body.th1-truong div.product .woocommerce-tabs ul.tabs li::after { content: none; display: none; }
body.th1-truong div.product .woocommerce-tabs ul.tabs li {
	margin: 0;
	padding: 0;
	border: 1px solid var(--th1-ke);
	border-radius: var(--th1-r-pill);
	background: var(--th1-trang);
}
body.th1-truong div.product .woocommerce-tabs ul.tabs li.active {
	background: var(--th1-la-dam);
	border-color: var(--th1-la-dam);
}
body.th1-truong div.product .woocommerce-tabs ul.tabs li a {
	display: block;
	padding: var(--th1-s-2) var(--th1-s-5);
	color: var(--th1-muc);
	font-weight: 700;
	text-decoration: none;
}
body.th1-truong div.product .woocommerce-tabs ul.tabs li.active a { color: #fff; }

body.th1-truong table.shop_attributes {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--th1-fs-2);
}
body.th1-truong table.shop_attributes th,
body.th1-truong table.shop_attributes td {
	padding: var(--th1-s-3) var(--th1-s-4);
	border-bottom: 1px solid var(--th1-ke);
	text-align: left;
}
body.th1-truong table.shop_attributes th { width: 220px; color: var(--th1-xam); }
body.th1-truong table.shop_attributes td p { margin: 0; }

body.th1-truong .related.products { padding-block: var(--th1-s-7); }
body.th1-truong .related.products > h2 { margin-bottom: var(--th1-s-6); }

/* =====================================================================
 * 9. TRANG TĨNH, GIỎ HÀNG, THANH TOÁN, TÀI KHOẢN
 *
 * WooCommerce 8 trở đi dựng ba trang này bằng BLOCK, và block lấy màu từ
 * `theme.json` chứ không từ CSS của theme con — nút mặc định ra xanh dương.
 * Nút của block cũng KHÔNG mang lớp `.button`, nên bộ chọn nút ở phần trên
 * không bắt được; phải liệt kê đủ các họ lớp ở đây.
 * ===================================================================== */
body.th1-truong .wc-block-components-button,
body.th1-truong .wc-block-cart__submit-button,
body.th1-truong .wc-block-components-checkout-place-order-button,
body.th1-truong .wc-block-components-product-button a,
body.th1-truong .wp-element-button {
	background: var(--th1-la-dam) !important;
	color: #fff !important;
	border-radius: var(--th1-r-pill) !important;
	font-weight: 800;
}
body.th1-truong .wc-block-components-button:hover,
body.th1-truong .wc-block-cart__submit-button:hover,
body.th1-truong .wc-block-components-checkout-place-order-button:hover {
	background: #33661C !important;
}

body.th1-truong .woocommerce-info,
body.th1-truong .woocommerce-message,
body.th1-truong .wc-block-components-notice-banner {
	border-radius: var(--th1-r-m);
	border-top-color: var(--th1-la-dam);
	background: var(--th1-kem);
	color: var(--th1-muc);
}
body.th1-truong .woocommerce-info::before,
body.th1-truong .woocommerce-message::before { color: var(--th1-la-dam); }

.th1-page__body > :last-child { margin-bottom: 0; }

/* =====================================================================
 * 10. CHÂN TRANG
 * ===================================================================== */
.th1-foot {
	background: var(--th1-tham);
	color: rgba(255, 255, 255, .88);
	padding-block: var(--th1-s-8) var(--th1-s-6);
	margin-top: var(--th1-s-8);
}
.th1-foot a { color: #fff; text-decoration: none; }
.th1-foot a:hover { text-decoration: underline; }
.th1-foot__grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
	gap: var(--th1-s-7);
}
.th1-foot h3 {
	color: #fff;
	font-size: var(--th1-fs-3);
	margin-bottom: var(--th1-s-4);
}
.th1-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--th1-s-2); }
.th1-foot__brand {
	display: flex;
	align-items: center;
	gap: var(--th1-s-3);
	margin-bottom: var(--th1-s-4);
	color: #fff;
	font-family: "Baloo 2", sans-serif;
	font-size: var(--th1-fs-4);
	font-weight: 700;
}
.th1-foot__gio {
	display: grid;
	gap: var(--th1-s-2);
	font-size: var(--th1-fs-2);
}
.th1-foot__gio b { color: var(--th1-vang); }
.th1-foot__day {
	margin-top: var(--th1-s-7);
	padding-top: var(--th1-s-5);
	border-top: 1px solid rgba(255, 255, 255, .18);
	font-size: var(--th1-fs-1);
	color: rgba(255, 255, 255, .72);
	display: flex;
	flex-wrap: wrap;
	gap: var(--th1-s-4);
	justify-content: space-between;
}

/* Lời nhắn sau khi gửi biểu mẫu. */
.th1-toast {
	position: fixed;
	left: 50%;
	bottom: var(--th1-s-5);
	transform: translateX(-50%);
	z-index: 90;
	max-width: min(560px, calc(100% - var(--th1-s-6)));
	padding: var(--th1-s-4) var(--th1-s-5);
	background: var(--th1-tham);
	color: #fff;
	border-radius: var(--th1-r-m);
	box-shadow: var(--th1-bong-l);
	font-size: var(--th1-fs-2);
}
.th1-js .th1-toast { animation: th1-toast .4s var(--th1-cong) both; }
@keyframes th1-toast {
	from { opacity: 0; transform: translate(-50%, 14px); }
	to   { opacity: 1; transform: translate(-50%, 0); }
}

/* =====================================================================
 * 11. VIỀN TIÊU ĐIỂM BÀN PHÍM
 *
 * `:focus-visible` chứ không `:focus`, nên người dùng chuột không thấy viền
 * nhảy ra sau mỗi lần bấm. Trên khối nền thẫm viền đổi sang trắng — xanh lá
 * đậm trên nền thẫm gần như không thấy.
 * ===================================================================== */
body.th1-truong a:focus-visible,
body.th1-truong button:focus-visible,
body.th1-truong input:focus-visible,
body.th1-truong select:focus-visible,
body.th1-truong textarea:focus-visible,
body.th1-truong [tabindex]:focus-visible {
	outline: 3px solid var(--th1-la-dam);
	outline-offset: 3px;
	border-radius: var(--th1-r-s);
}
.th1-nut:focus-visible,
.th1-chip:focus-visible { border-radius: var(--th1-r-pill); }

.th1-foot a:focus-visible,
.th1-ts a:focus-visible,
.th1-ts button:focus-visible,
.th1-csvc__o a:focus-visible {
	outline-color: #fff;
}

/* =====================================================================
 * 12. MÀN HÌNH HẸP
 * ===================================================================== */
@media (max-width: 1240px) {
	/*
	 * Nút "Đăng ký tham quan" rời khỏi đầu trang trước khi hàng đầu trang chật.
	 * Không mất đường nào: menu vẫn có mục Liên hệ, và mọi trang đều có nút đăng
	 * ký trong nội dung.
	 */
	/* Phải đủ hai lớp: `body.th1-truong .th1-nut` ở trên đã khai `display:
	   inline-flex`, mà câu lệnh @media KHÔNG cộng thêm độ ưu tiên nào. */
	body.th1-truong .th1-head__dk { display: none; }
}

@media (max-width: 1100px) {
	.th1-luoi-4 { grid-template-columns: repeat(2, 1fr); }
	.th1-gio { grid-template-columns: repeat(3, 1fr); }
	.th1-foot__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 960px) {
	.th1-hero__grid { grid-template-columns: 1fr; gap: var(--th1-s-6); }
	.th1-hero__media { aspect-ratio: 16 / 10; }
	.th1-ts { grid-template-columns: 1fr; padding: var(--th1-s-7) var(--th1-s-5); }
	.th1-thuvien { grid-template-columns: 1fr; }
	.th1-sp { grid-template-columns: 1fr; gap: var(--th1-s-6); }
	.th1-bong-bay { display: none; }

	/* Menu điện thoại: trôi xuống, không chồng lên nội dung đang đọc. */
	.th1-burger { display: inline-flex; align-items: center; justify-content: center; }
	.th1-nav {
		position: absolute;
		left: 0; right: 0; top: 100%;
		margin: 0;
		background: var(--th1-trang);
		border-bottom: 1px solid var(--th1-ke);
		box-shadow: var(--th1-bong-l);
		opacity: 0;
		transform: translateY(-8px);
		pointer-events: none;
		transition: opacity .22s var(--th1-cong), transform .22s var(--th1-cong);
	}
	.th1-nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
	.th1-nav ul {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding: var(--th1-s-3) var(--th1-s-5) var(--th1-s-5);
	}
	.th1-nav li { border-bottom: 1px solid var(--th1-ke); }
	.th1-nav li:last-child { border-bottom: 0; }
	.th1-nav a { padding: var(--th1-s-4) 0; }
	.th1-nav a::after { display: none; }
	.th1-head__row { position: relative; }
	.th1-tools { margin-left: auto; }
}

@media (max-width: 820px) {
	body.th1-truong .woocommerce ul.products,
	body.th1-truong ul.products,
	.th1-luoi-3 { grid-template-columns: repeat(2, 1fr); }
	.th1-gio { grid-template-columns: repeat(2, 1fr); }
	.th1-form { grid-template-columns: 1fr; }
	.th1-dem { grid-template-columns: 1fr; gap: var(--th1-s-4); }
}

@media (max-width: 600px) {
	.th1-wrap { width: min(1220px, 100% - var(--th1-s-5)); }
	.th1-khoi { padding-block: var(--th1-s-7); }
	body.th1-truong .woocommerce ul.products,
	body.th1-truong ul.products,
	.th1-luoi-3,
	.th1-luoi-4,
	.th1-gio { grid-template-columns: 1fr; }
	.th1-goi .th1-goi__chu { display: none; }

	/*
	 * Dòng "TRƯỜNG MẦM NON TƯ THỤC" dài hơn cả chiều ngang điện thoại. Phần tử
	 * flex mặc định `min-width: auto` nên nó KHÔNG co, mà đẩy cả cụm công cụ
	 * ra ngoài lề — đo được ở 375px: nút menu nằm ở 380,9 trong khi lề phải của
	 * khối bọc là 363. Giấu dòng ấy đi và cho tên trường co được.
	 */
	.th1-brand__tag { display: none; }
	.th1-brand,
	.th1-brand__text { min-width: 0; }
	.th1-brand__name {
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}
	.th1-foot__grid { grid-template-columns: 1fr; gap: var(--th1-s-6); }
	.th1-thuvien__nut { grid-template-columns: repeat(3, 1fr); }
	body.th1-truong table.shop_attributes th { width: 42%; }
}
