/*
Theme Name: Tín Phát Land
Theme URI: https://mauwebsitedep.net/
Description: Mẫu website bất động sản cho sàn giao dịch và công ty môi giới (batdongsan-mau-05). Theme con của vinasite, chạy WooCommerce ở chế độ danh mục: tin đăng không bán qua giỏ hàng.
Author: VinaSite
Author URI: https://vinasite.com.vn/
Template: vinasite
Version: 1.0.0
Text Domain: batdongsan-mau-05
*/

/* =====================================================================
 * TÍN PHÁT LAND — bảng màu và hình khối
 *
 * CỐ Ý KHÁC HẲN NĂM MẪU BẤT ĐỘNG SẢN CÒN LẠI TRONG BỘ:
 *
 *   01 chủ đầu tư căn hộ cao cấp  navy + vàng đồng
 *   02 nhà phố, đất nền           xanh lá, dạng bảng
 *   03 cho thuê                   xanh cyan, dạng thanh lọc
 *   04 biệt thự nghỉ dưỡng        be + xanh biển
 *   05 SÀN GIAO DỊCH (tệp này)    ĐỎ CAM + TRẮNG + THAN CHÌ, mật độ cao
 *   06 bất động sản công nghiệp   xám thép
 *
 * Ba thứ nhận ra mẫu này ngay: góc VUÔNG 4px (năm mẫu kia bo tròn hoặc vòm),
 * MỘT họ phông duy nhất (Barlow, hai dáng), và MẬT ĐỘ — lưới bốn cột, thẻ nào
 * cũng mang bốn dòng thông số, dải tiện ích trên đầu trang.
 *
 * Barlow Condensed hẹp ngang nên nhồi được nhiều chữ vào một dòng mà vẫn đọc
 * được — đúng thứ một sàn giao dịch cần, và cả hai dáng đều dựng đủ dấu tiếng
 * Việt.
 * ===================================================================== */
:root {
	--tpl-sans:  "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
	--tpl-hep:   "Barlow Condensed", "Barlow", system-ui, sans-serif;

	/* Đỏ cam. MỘT màu cho cả nền lẫn chữ: trắng trên nó 5,04:1, nó trên nền
	   trắng cũng 5,04:1 — khỏi phải nhớ hai mã cho hai chỗ. */
	--tpl-cam:      #CF3508;
	--tpl-cam-dam:  #A82A06;
	--tpl-cam-mo:   #FCEDE8;
	/* Chỉ dùng cho nét trang trí, KHÔNG đặt chữ lên. */
	--tpl-cam-sang: #F0531D;

	--tpl-than:   #23282D;
	--tpl-than-2: #171B1F;
	--tpl-muc:    #1A1E22;
	--tpl-than-3: #2E343A;

	--tpl-mat:     #FFFFFF;
	--tpl-nen:     #F4F5F6;
	--tpl-nen-2:   #EAECEE;
	--tpl-vien:    #DCE0E4;
	--tpl-mo:      #5C666F;
	--tpl-sang-mo: #A8B0B7;

	/* Xanh KHÔNG xuất hiện ở phần nhìn của mẫu. Nó chỉ để ánh xạ `--vs-success`
	   của theme mẹ (dải thông báo thành công trên trang 404 và tìm kiếm chung),
	   nơi màu xanh là quy ước ai cũng hiểu. Hai nhãn tin đăng dùng đúng hai màu
	   thương hiệu: "Mới" than chì, "Giá tốt" đỏ cam. */
	--tpl-xanh: #0E7C66;

	/* Chữ trên nền ẢNH, nền ĐỎ CAM và nền THAN. Đặt thành biến chứ không viết
	   thẳng vào luật: phép quét màu đọc bảng màu từ chính `:root` lúc chạy, nên
	   màu nào không có ở đây sẽ bị báo là "màu lạ" — và nới danh sách cho qua là
	   tự bịt mắt mình. */
	--tpl-tren-anh:     #E6E9EB;
	--tpl-tren-anh-mo:  #D2D7DA;
	--tpl-tren-than:    #D8DCDF;
	--tpl-tren-cam:     #FEF4F0;
	--tpl-tren-chon:    #C8CDD1;
	--tpl-vien-toi:     #434A51;
	--tpl-gach:         #7D858C;
	--tpl-vien-ro:      #BFC6CC;

	--tpl-max: 1280px;
	--tpl-gut: 20px;
	--tpl-pad: clamp(56px, 7vw, 88px);

	--tpl-r:    4px;
	--tpl-r-sm: 3px;

	--tpl-bong:   0 1px 2px rgba(23, 40, 45, .05), 0 10px 24px -16px rgba(23, 40, 45, .26);
	--tpl-bong-2: 0 2px 6px rgba(23, 40, 45, .07), 0 22px 44px -22px rgba(23, 40, 45, .36);
}

/* =====================================================================
 * ÁNH XẠ BIẾN CỦA THEME MẸ SANG BẢNG MÀU CỦA MẪU
 *
 * Theme mẹ dựng toàn bộ hệ thiết kế của nó trên biến CSS khai ở `:root`
 * (`--vs-primary`, `--vs-text`, `--vs-font`…). Mọi trang do THEME MẸ dựng —
 * trang 404 và trang tìm kiếm chung, hai trang mẫu này không có mẫu riêng —
 * đều lấy màu và phông từ đó, nên chúng ra nút xanh dương, chữ `#201d1a`,
 * phông Be Vietnam Pro.
 *
 * Khai lại chính những biến ấy ở `body.tpl-san` (0,1,1) là đè được `:root`
 * (0,1,0) và MỌI luật của theme mẹ tự đổi theo một lượt — kể cả luật ở những
 * trang chưa từng mở ra xem. Gọn và chắc hơn hẳn việc đi dò từng lớp `.vs-*`.
 *
 * NHƯNG ánh xạ biến CHỈ đổi được NỀN. Thành phần nào của theme mẹ khai màu CHỮ
 * bằng giá trị cố định thì vẫn giữ nguyên — chữ cũ trên nền mới, và tương phản
 * có thể tụt xuống gần như vô hình. Phải khai riêng `color` cho `.vs-btn--primary`,
 * `.vs-btn--outline`, `.search-submit`, `.vs-eyebrow`: xem cuối tệp.
 * ===================================================================== */
body.tpl-san {
	--vs-font:          var(--tpl-sans);
	--vs-text:          var(--tpl-muc);
	--vs-muted:         var(--tpl-mo);
	--vs-primary:       var(--tpl-cam);
	--vs-primary-dark:  var(--tpl-cam-dam);
	--vs-secondary:     var(--tpl-than);
	--vs-accent:        var(--tpl-cam);
	--vs-accent-hover:  var(--tpl-cam-dam);
	--vs-gold-text:     var(--tpl-cam);
	--vs-lotus:         var(--tpl-cam);
	--vs-lotus-soft:    var(--tpl-cam-mo);
	--vs-danger:        var(--tpl-cam-dam);
	--vs-success:       var(--tpl-xanh);
	--vs-bg-light:      var(--tpl-nen);
	--vs-bg-soft:       var(--tpl-nen-2);
	--vs-border:        var(--tpl-vien);
	--vs-white:         var(--tpl-mat);
	--vs-radius-sm:     var(--tpl-r-sm);
	--vs-radius-md:     var(--tpl-r);
	--vs-radius-lg:     var(--tpl-r);
	--vs-container:     var(--tpl-max);
}

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

body.tpl-san {
	margin: 0;
	background: var(--tpl-nen);
	color: var(--tpl-muc);
	font: 400 16px/1.65 var(--tpl-sans);
	-webkit-font-smoothing: antialiased;
}

/* MỌI luật đặt màu chữ cho một thẻ `<a>` phải mang tiền tố `body.tpl-san`.
   Luật ngay dưới đây là (0,1,2) và nó NUỐT mọi luật một lớp (0,1,0) — nút
   `.tpl-btn--sang` nền trắng từng ra CHỮ TRẮNG trên nền trắng, đo được 1,00:1,
   còn nút gọi `.tpl-goi` nền đỏ cam thì ra chữ màu mực. Hai lỗi ấy không lộ ra
   ở nút nền tối, vì ở đó màu thừa kế tình cờ cũng là trắng. */
body.tpl-san a { color: inherit; text-decoration: none; }
body.tpl-san img { display: block; max-width: 100%; height: auto; }
body.tpl-san button, body.tpl-san input, body.tpl-san select, body.tpl-san textarea { font: inherit; }

/* Firefox áp sẵn `opacity: .54` cho chữ gợi ý trong ô nhập. Không khai lại thì
   mọi con số tương phản đo trên Chromium đều CAO HƠN thực tế trên Firefox. */
body.tpl-san ::placeholder { opacity: 1; color: var(--tpl-mo); }

/* Theme mẹ có luật riêng cho h1–h3 trong nội dung (màu xanh dương) và luật ấy
   là hai lớp. Khai `inherit` ở cùng độ nặng thì tiêu đề tự đúng màu trong cả
   khối nền sáng lẫn khối nền than — không phải liệt kê từng ngoại lệ. */
body.tpl-san h1, body.tpl-san h2, body.tpl-san h3 {
	margin: 0;
	color: inherit;
	font-family: var(--tpl-hep);
	font-weight: 700;
	line-height: 1.12;
	letter-spacing: .002em;
}

/* Theme mẹ bọc nội dung trong `.vs-scope` và đặt THẲNG trên phần tử ấy:
   `font-family: var(--vs-font); color: var(--vs-text); font-size: 16px;
   line-height: 1.65`. Luật đặt thẳng lên phần tử luôn THẮNG giá trị thừa kế từ
   `body`, nên mọi trang có `.vs-scope` — danh sách tin, nhóm, chi tiết, giới
   thiệu, liên hệ, giỏ hàng, tài khoản, tức tất cả trừ trang chủ — chạy chữ
   bằng phông của theme mẹ.

   ĐÂY KHÔNG PHẢI CUỘC SO ĐỘ ƯU TIÊN. Thừa kế chỉ có tác dụng khi phần tử không
   có khai báo nào của riêng nó; đã có khai báo thẳng thì nó thắng, bất kể luật
   trên `body` nặng bao nhiêu. Cách phòng duy nhất là khai lại THẲNG lên
   `.vs-scope` như dưới đây.

   Lỗi này KHÔNG nhìn ra bằng mắt — phải đọc `getComputedStyle` mới thấy. Và
   phải sửa chỗ này TRƯỚC khi gỡ `vs-font` trong functions.php. */
body.tpl-san .vs-scope {
	font-family: var(--tpl-sans);
	font-size: 16px;
	line-height: 1.65;
	color: var(--tpl-muc);
}

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

/* Liên kết bỏ qua, dành cho người dùng bàn phím.
   PHẢI viết `body.tpl-san .tpl-skip`: luật `body.tpl-san a { color: inherit }`
   là (0,1,2) và nuốt mất `color: #fff` của một luật một lớp (0,1,0). Khi ấy
   chữ ra đúng màu nền — liên kết TÀNG HÌNH, mà đây lại là thứ đầu tiên người
   dùng bàn phím chạm tới. */
body.tpl-san .tpl-skip {
	position: absolute; z-index: 100; top: 10px; left: 10px;
	transform: translateY(-200%); border-radius: var(--tpl-r); padding: 11px 18px;
	background: var(--tpl-cam); color: #fff;
	font-size: 14px; font-weight: 600; transition: transform .2s ease;
}
body.tpl-san .tpl-skip:focus { transform: translateY(0); }

body.tpl-san :focus-visible { outline: 3px solid var(--tpl-cam); outline-offset: 2px; }

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

/* =====================================================================
 * NÚT
 * ===================================================================== */
body.tpl-san .tpl-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 44px; padding: 0 20px;
	border: 1px solid var(--tpl-cam); border-radius: var(--tpl-r);
	background: var(--tpl-cam); color: #fff;
	font-family: var(--tpl-sans); font-size: 14.5px; font-weight: 600; line-height: 1;
	white-space: nowrap; text-decoration: none;
	transition: background .18s ease, border-color .18s ease, color .18s ease;
}
body.tpl-san .tpl-btn:hover { background: var(--tpl-cam-dam); border-color: var(--tpl-cam-dam); color: #fff; }
.tpl-btn svg { width: 17px; height: 17px; flex: none; }
body.tpl-san .tpl-btn--to { min-height: 50px; padding: 0 26px; font-size: 15.5px; }
body.tpl-san .tpl-btn--nho { min-height: 38px; padding: 0 14px; font-size: 13.5px; }
body.tpl-san .tpl-btn--rong { width: 100%; }
body.tpl-san .tpl-btn--vien { background: transparent; border-color: var(--tpl-than); color: var(--tpl-muc); }
body.tpl-san .tpl-btn--vien:hover { background: var(--tpl-than); border-color: var(--tpl-than); color: #fff; }
body.tpl-san .tpl-btn--sang { background: var(--tpl-mat); border-color: var(--tpl-mat); color: var(--tpl-muc); }
body.tpl-san .tpl-btn--sang:hover { background: var(--tpl-nen-2); border-color: var(--tpl-nen-2); color: var(--tpl-muc); }

body.tpl-san .tpl-lien {
	display: inline-flex; align-items: center; gap: 7px;
	color: var(--tpl-cam); font-size: 14.5px; font-weight: 600;
}
.tpl-lien svg { width: 16px; height: 16px; transition: transform .2s ease; }
.tpl-lien:hover svg { transform: translateX(4px); }
body.tpl-san .tpl-lien--nho { font-size: 13.5px; }

/* =====================================================================
 * ĐẦU TRANG
 * ===================================================================== */
.tpl-util { background: var(--tpl-than-2); color: var(--tpl-sang-mo); font-size: 13px; }
.tpl-util__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
	gap: 8px 18px; min-height: 36px; padding: 6px 0; }
.tpl-util__note { margin: 0; }
.tpl-util__end { display: flex; align-items: center; gap: 10px; }
body.tpl-san .tpl-util__end a { display: inline-flex; align-items: center; gap: 6px; color: #fff; font-weight: 600; }
body.tpl-san .tpl-util__end a:hover { color: var(--tpl-cam-sang); }
.tpl-util__end svg { width: 14px; height: 14px; }

.tpl-head {
	position: sticky; top: 0; z-index: 40;
	background: var(--tpl-mat);
	border-bottom: 1px solid var(--tpl-vien);
	transition: box-shadow .22s ease;
}
.tpl-head.is-cuon { box-shadow: var(--tpl-bong); }
.tpl-head__row { display: flex; align-items: center; gap: 18px; min-height: 72px; }

.tpl-brand { display: inline-flex; align-items: center; gap: 11px; flex: none; }
.tpl-brand__mark { display: block; flex: none; }
.tpl-brand__mark svg { display: block; }
.tpl-brand__text { display: flex; flex-direction: column; }
.tpl-brand__name { font-family: var(--tpl-hep); font-size: 24px; font-weight: 700;
	line-height: 1.05; letter-spacing: .005em; }
.tpl-brand__tag { color: var(--tpl-mo); font-size: 10.5px; font-weight: 600; letter-spacing: .14em; }

.tpl-nav { margin-left: auto; }
.tpl-nav ul { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.tpl-nav a {
	display: inline-flex; align-items: center; height: 40px; padding: 0 13px;
	border-radius: var(--tpl-r-sm);
	font-size: 15px; font-weight: 600;
	transition: background .18s ease, color .18s ease;
}
.tpl-nav a:hover { background: var(--tpl-nen); color: var(--tpl-cam); }
/* Màu chữ dùng sắc ĐẬM chứ không phải `--tpl-cam`: trên nền `--tpl-cam-mo`
   sắc thường chỉ đạt 4,42:1, trượt chuẩn AA đúng một nấc. */
.tpl-nav a[aria-current="page"] { color: var(--tpl-cam-dam); background: var(--tpl-cam-mo); }

.tpl-tools { display: flex; align-items: center; gap: 8px; flex: none; }
.tpl-stool, .tpl-burger {
	display: inline-grid; place-items: center; width: 42px; height: 42px;
	border: 1px solid var(--tpl-vien); border-radius: var(--tpl-r-sm);
	background: var(--tpl-mat); color: var(--tpl-muc); cursor: pointer;
	transition: border-color .18s ease, color .18s ease;
}
.tpl-stool:hover, .tpl-burger:hover { border-color: var(--tpl-cam); color: var(--tpl-cam); }
.tpl-stool svg { width: 19px; height: 19px; }
.tpl-stool.is-mo, .tpl-burger.is-mo { background: var(--tpl-than); border-color: var(--tpl-than); color: #fff; }
.tpl-burger span[aria-hidden] { display: grid; gap: 4px; }
.tpl-burger i { display: block; width: 17px; height: 2px; background: currentColor; }
.tpl-burger { display: none; }

body.tpl-san .tpl-goi {
	display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px;
	border-radius: var(--tpl-r-sm); background: var(--tpl-cam); color: #fff;
	font-family: var(--tpl-hep); font-size: 19px; font-weight: 700; letter-spacing: .01em;
	transition: background .18s ease;
}
body.tpl-san .tpl-goi:hover { background: var(--tpl-cam-dam); color: #fff; }
.tpl-goi svg { width: 16px; height: 16px; }

.tpl-menu { display: none; border-top: 1px solid var(--tpl-vien); background: var(--tpl-mat); }
.tpl-menu.is-mo { display: block; }
.tpl-menu ul { margin: 0; padding: 10px 0; list-style: none; }
.tpl-menu li + li { border-top: 1px solid var(--tpl-vien); }
.tpl-menu a { display: block; padding: 13px 2px; font-size: 16px; font-weight: 600; }
.tpl-menu a[aria-current="page"] { color: var(--tpl-cam); }
.tpl-menu .tpl-btn { margin: 12px 0 18px; }

.tpl-search { display: none; border-top: 1px solid var(--tpl-vien); background: var(--tpl-nen); }
.tpl-search.is-mo { display: block; }
.tpl-search form { display: flex; flex-wrap: wrap; gap: 10px; padding: 16px 0; }
.tpl-search input[type="search"] {
	flex: 1 1 220px; min-width: 0; height: 46px; padding: 0 14px;
	border: 1px solid var(--tpl-vien); border-radius: var(--tpl-r);
	background: var(--tpl-mat); color: var(--tpl-muc);
}
.tpl-search input[type="search"]:focus { outline: 0; border-color: var(--tpl-cam); }

/* =====================================================================
 * TRANG CHỦ — HERO VÀ THANH TÌM NHANH
 * ===================================================================== */
.tpl-hero { position: relative; isolation: isolate; background: var(--tpl-than-2); color: #fff; overflow: hidden; }
.tpl-hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
/*
 * Lớp phủ dày. Mẫu bán sẵn thì shop CHẮC CHẮN thay ảnh, nên độ tương phản phải
 * tính với giả định xấu nhất: ảnh TRẮNG HOÀN TOÀN. Ở độ đục .78 chỗ nhạt nhất,
 * nền ghép ra khoảng `#53575B` và chữ trắng vẫn đạt 7,6:1.
 */
.tpl-hero::after {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background: linear-gradient(100deg, rgba(23, 27, 31, .95) 0%, rgba(23, 27, 31, .9) 48%, rgba(23, 27, 31, .78) 100%);
}
.tpl-hero__in { padding: clamp(52px, 7vw, 86px) 0 clamp(40px, 5vw, 58px); }
.tpl-hero__eyebrow {
	margin: 0 0 14px; display: inline-flex; align-items: center;
	padding: 5px 11px; border-left: 3px solid var(--tpl-cam-sang);
	background: rgba(255, 255, 255, .08);
	color: #fff; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
}
.tpl-hero__h1 {
	margin: 0 0 16px; max-width: 18ch;
	font-size: clamp(40px, 6.2vw, 72px); line-height: 1.02; letter-spacing: -.005em;
}
.tpl-hero__sub { margin: 0 0 30px; max-width: 62ch; color: var(--tpl-tren-anh); font-size: 17px; }
.tpl-hero__note { margin: 16px 0 0; color: var(--tpl-tren-anh-mo); font-size: 13px; }

.tpl-tim {
	display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 12px; align-items: end;
	padding: 16px; border-radius: var(--tpl-r); background: var(--tpl-mat);
	box-shadow: var(--tpl-bong-2);
}
.tpl-tim__o { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tpl-tim__o label { color: var(--tpl-mo); font-size: 11.5px; font-weight: 700;
	letter-spacing: .1em; text-transform: uppercase; }
.tpl-tim__o input, .tpl-tim__o select {
	height: 50px; min-width: 0; padding: 0 12px;
	border: 1px solid var(--tpl-vien); border-radius: var(--tpl-r-sm);
	background: var(--tpl-mat); color: var(--tpl-muc); font-size: 15.5px;
}
.tpl-tim__o input:focus, .tpl-tim__o select:focus { outline: 0; border-color: var(--tpl-cam); }
.tpl-tim .tpl-btn { align-self: end; }

/* =====================================================================
 * DẢI SỐ LIỆU
 * ===================================================================== */
.tpl-so { background: var(--tpl-than); color: #fff; }
.tpl-so__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tpl-so__grid > div { padding: 24px 20px 24px 0; }
.tpl-so__grid > div + div { padding-left: 24px; border-left: 1px solid rgba(255, 255, 255, .14); }
.tpl-so strong { display: block; font-family: var(--tpl-hep); font-size: 36px; font-weight: 700; line-height: 1; }
.tpl-so span { display: block; margin-top: 6px; color: var(--tpl-sang-mo); font-size: 13.5px; }

/* =====================================================================
 * KHỐI CHUNG CỦA TRANG CHỦ
 * ===================================================================== */
.tpl-kh { padding: var(--tpl-pad) 0; }
.tpl-kh--moi { background: var(--tpl-nen); }
.tpl-kh--nhom { background: var(--tpl-mat); }
.tpl-kh--mg { background: var(--tpl-nen); }
.tpl-kh--qt { background: var(--tpl-mat); }

.tpl-kh__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
	gap: 14px 24px; margin-bottom: 30px; }
.tpl-kh__eyebrow { margin: 0 0 8px; color: var(--tpl-cam); font-size: 12px; font-weight: 700;
	letter-spacing: .14em; text-transform: uppercase; }
.tpl-kh__h2 { font-size: clamp(30px, 3.6vw, 42px); }
.tpl-kh__sub { margin: 10px 0 0; max-width: 64ch; color: var(--tpl-mo); font-size: 15.5px; }

/* =====================================================================
 * NHÓM BẤT ĐỘNG SẢN
 * ===================================================================== */
.tpl-nhom { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.tpl-nhom__o {
	position: relative; display: block; overflow: hidden;
	border-radius: var(--tpl-r); background: var(--tpl-than);
	aspect-ratio: 4 / 3;
}
.tpl-nhom__o img { width: 100%; height: 100%; object-fit: cover;
	transition: transform .5s cubic-bezier(.22, .8, .3, 1); }
.tpl-nhom__o:hover img { transform: scale(1.05); }
/*
 * Chữ trên ô danh mục nằm trên ẢNH, nên phép quét tương phản bằng màu nền
 * KHÔNG đo được nó (gradient tính là ảnh nền). Phải tính tay với giả định xấu
 * nhất — shop thay bằng ảnh TRẮNG TINH: ở độ đục .9 chỗ chữ nằm, nền ghép ra
 * khoảng `#3A3E42` và chữ trắng đạt trên 9:1.
 */
.tpl-nhom__o::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(to top, rgba(23, 27, 31, .92) 0%, rgba(23, 27, 31, .9) 34%, rgba(23, 27, 31, .1) 78%);
}
.tpl-nhom__in { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; padding: 20px; color: #fff; }
.tpl-nhom__ten { display: block; font-family: var(--tpl-hep); font-size: 27px; font-weight: 700; }
.tpl-nhom__dem { display: block; margin-top: 3px; color: var(--tpl-tren-anh); font-size: 13.5px; font-weight: 600; }

/* =====================================================================
 * MÔI GIỚI CỦA CHÚNG TÔI
 * ===================================================================== */
.tpl-mgs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.tpl-mgs__o {
	display: flex; flex-direction: column; gap: 10px;
	padding: 24px 20px; border: 1px solid var(--tpl-vien); border-top: 3px solid var(--tpl-cam);
	border-radius: var(--tpl-r); background: var(--tpl-mat);
}
.tpl-mgs__icon { display: inline-grid; place-items: center; width: 44px; height: 44px;
	border-radius: var(--tpl-r-sm); background: var(--tpl-cam-mo); color: var(--tpl-cam); }
.tpl-mgs__icon svg { width: 26px; height: 26px; }
.tpl-mgs__o h3 { font-size: 21px; }
.tpl-mgs__o p { margin: 0; color: var(--tpl-mo); font-size: 14.5px; }
.tpl-mgs__o .tpl-lien { margin-top: auto; align-self: flex-start; }

/* =====================================================================
 * QUY TRÌNH
 * ===================================================================== */
.tpl-qt { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px;
	margin: 0; padding: 0; list-style: none; counter-reset: none; }
.tpl-qt li { padding: 22px 20px; border-left: 3px solid var(--tpl-cam); background: var(--tpl-nen); border-radius: 0 var(--tpl-r) var(--tpl-r) 0; }
.tpl-qt span { display: block; font-family: var(--tpl-hep); font-size: 15px; font-weight: 700;
	letter-spacing: .14em; color: var(--tpl-cam); }
.tpl-qt h3 { margin: 6px 0 8px; font-size: 22px; }
.tpl-qt p { margin: 0; color: var(--tpl-mo); font-size: 14.5px; }
.tpl-qt__note { margin: 20px 0 0; color: var(--tpl-mo); font-size: 13.5px; }

/* =====================================================================
 * DẢI KÝ GỬI
 * ===================================================================== */
.tpl-cta { background: var(--tpl-cam); color: #fff; }
.tpl-cta__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
	gap: 24px; padding: clamp(36px, 4.6vw, 56px) 0; }
.tpl-cta h2 { font-size: clamp(28px, 3.4vw, 40px); }
.tpl-cta p { margin: 10px 0 0; max-width: 60ch; color: var(--tpl-tren-cam); font-size: 16px; }
.tpl-cta__nut { display: flex; flex-wrap: wrap; gap: 12px; }
body.tpl-san .tpl-cta__nut .tpl-btn { border-color: #fff; }
body.tpl-san .tpl-cta__nut .tpl-btn:not(.tpl-btn--sang) { background: var(--tpl-than); border-color: var(--tpl-than); }
body.tpl-san .tpl-cta__nut .tpl-btn:not(.tpl-btn--sang):hover { background: var(--tpl-than-2); border-color: var(--tpl-than-2); }

/* =====================================================================
 * DẢI ĐẦU CỦA CÁC TRANG CON
 * ===================================================================== */
.tpl-page { display: block; }
.tpl-page__head { padding: 30px 0 26px; background: var(--tpl-than); color: #fff; }
.tpl-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 7px;
	margin-bottom: 12px; color: var(--tpl-sang-mo); font-size: 13px; }
.tpl-crumb a:hover { color: #fff; text-decoration: underline; }
.tpl-crumb span[aria-hidden] { color: var(--tpl-gach); }
.tpl-page__title { font-size: clamp(30px, 4.2vw, 46px); }
.tpl-page__sub { margin: 12px 0 0; max-width: 78ch; color: var(--tpl-tren-than); font-size: 15.5px; }
.tpl-page__body { padding: 34px 0 var(--tpl-pad); }

.tpl-notices { padding-top: 16px; }

/* =====================================================================
 * DANH SÁCH TIN ĐĂNG — THANH LỌC VÀ LƯỚI
 * ===================================================================== */
.tpl-ds__body { padding: 26px 0 var(--tpl-pad); }
.tpl-ds__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
	gap: 14px; margin-bottom: 24px; }
.tpl-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tpl-chip {
	display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 14px;
	border: 1px solid var(--tpl-vien); border-radius: var(--tpl-r-sm); background: var(--tpl-mat);
	font-size: 14px; font-weight: 600;
	transition: border-color .18s ease, background .18s ease, color .18s ease;
}
.tpl-chip span { color: var(--tpl-mo); font-size: 12px; font-weight: 700; }
.tpl-chip:hover { border-color: var(--tpl-cam); color: var(--tpl-cam); }
.tpl-chip.is-on { background: var(--tpl-than); border-color: var(--tpl-than); color: #fff; }
/* Số đếm trên thẻ đang chọn: màu ĐẶC, không dùng `rgba(255,255,255,.7)`.
   Màu chữ đục bị phép quét tương phản tính như màu đặc nên báo cao hơn thực
   tế — một lỗi "báo đạt sai" đã gặp ở hai mẫu trước. */
.tpl-chip.is-on span { color: var(--tpl-tren-chon); }

.tpl-ds__sort form.woocommerce-ordering { margin: 0; }
body.tpl-san .woocommerce-ordering select {
	min-height: 38px; border: 1px solid var(--tpl-vien); border-radius: var(--tpl-r-sm);
	padding: 0 12px; background: var(--tpl-mat); color: var(--tpl-muc);
	font-size: 14px; font-weight: 600;
}

.tpl-loc { display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
	margin: 0 0 20px; padding: 10px 14px; border-left: 3px solid var(--tpl-cam);
	background: var(--tpl-cam-mo); font-size: 14px; }
/* Sắc ĐẬM: trên nền `--tpl-cam-mo` sắc thường chỉ đạt 4,42:1. */
body.tpl-san .tpl-loc a { color: var(--tpl-cam-dam); font-weight: 700; text-decoration: underline; }

.tpl-trong { padding: 40px 0; color: var(--tpl-mo); }

/* --- Lưới và thẻ tin đăng: dùng chung cho danh sách, nhóm, liên quan, trang chủ --- */
body.tpl-san ul.products {
	display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 22px 18px; margin: 0; padding: 0; list-style: none;
}
body.tpl-san ul.products::before, body.tpl-san ul.products::after { display: none; }
body.tpl-san ul.products li.product {
	position: relative; float: none; width: auto; margin: 0; min-width: 0; text-align: left;
	display: flex; flex-direction: column;
	border: 1px solid var(--tpl-vien); border-radius: var(--tpl-r);
	background: var(--tpl-mat); overflow: hidden;
	transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
body.tpl-san ul.products li.product:hover {
	border-color: var(--tpl-vien-ro); box-shadow: var(--tpl-bong); transform: translateY(-2px);
}

/* WooCommerce nạp `woocommerce-smallscreen.css` dưới 769px và ép
   `width: 48%; float: left; clear: both` cho thẻ bằng dạng chọn
   `ul.products[class*="columns-"] li.product`. Bộ chọn thuộc tính tính như một
   lớp nên dạng ấy NẶNG HƠN luật ba lớp thông thường, `width: 48%` của nó thắng
   và thẻ co còn nửa ô lưới — trong khi `grid-template-columns` vẫn báo đúng số
   cột, nên rất dễ tưởng lưới còn tốt.

   CHỈ `width` mới thật sự gây hại: `float`/`clear` không có tác dụng lên phần
   tử con của lưới. Khi dò lỗi đừng tin `getComputedStyle(li).float`, hãy đo
   `getBoundingClientRect().left`. */
body.tpl-san ul.products[class*="columns-"] li.product {
	float: none; clear: none; width: auto; margin: 0;
}

body.tpl-san ul.products li.product > a:first-of-type {
	display: block; position: relative; overflow: hidden; background: var(--tpl-nen-2);
}
body.tpl-san ul.products li.product a img {
	width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin: 0;
	transition: transform .5s cubic-bezier(.22, .8, .3, 1);
}
body.tpl-san ul.products li.product:hover a img { transform: scale(1.04); }

/* Nhãn "Sale!" mặc định của WooCommerce bị tắt: theme đã có nhãn riêng ở
   `tpl_nhan_the()` trong inc/shop.php, hai nhãn chồng nhau thì rối. */
body.tpl-san span.onsale { display: none; }

.tpl-tags { position: absolute; z-index: 2; top: 10px; left: 10px; display: flex; gap: 5px; }
.tpl-tag {
	display: inline-flex; align-items: center; height: 23px; padding: 0 9px;
	border-radius: var(--tpl-r-sm); background: var(--tpl-than); color: #fff;
	font-family: var(--tpl-sans); font-size: 11px; font-weight: 700;
	letter-spacing: .08em; text-transform: uppercase;
}
.tpl-tag--tot { background: var(--tpl-cam); }
.tpl-tag--moi { background: var(--tpl-than); }

body.tpl-san ul.products li.product .woocommerce-loop-product__title {
	margin: 0; padding: 14px 14px 0; color: var(--tpl-muc);
	font-family: var(--tpl-hep); font-size: 20px; font-weight: 700; line-height: 1.16;
}
body.tpl-san ul.products li.product .price {
	display: block; margin: 0; padding: 6px 14px 0;
	color: var(--tpl-cam); font-family: var(--tpl-hep);
	font-size: 23px; font-weight: 700; line-height: 1.2;
}
body.tpl-san ul.products li.product .price del { margin-right: 7px; color: var(--tpl-mo);
	font-size: 17px; font-weight: 600; opacity: 1; }
body.tpl-san ul.products li.product .price ins { text-decoration: none; color: var(--tpl-cam); }
.tpl-gia-demo { display: inline-block; margin-left: 6px; color: var(--tpl-mo);
	font-family: var(--tpl-sans); font-size: 11.5px; font-weight: 600;
	letter-spacing: .04em; text-transform: uppercase; }

.tpl-the__ts { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 0 14px; list-style: none; }
.tpl-the__ts li {
	padding: 3px 8px; border: 1px solid var(--tpl-vien); border-radius: var(--tpl-r-sm);
	background: var(--tpl-nen); color: var(--tpl-mo); font-size: 12.5px; font-weight: 600;
}
.tpl-the__vt { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; padding: 0 14px;
	color: var(--tpl-mo); font-size: 13.5px; }
.tpl-the__vt svg { width: 15px; height: 15px; flex: none; }

body.tpl-san ul.products li.product .tpl-btn--nho { margin: 14px 14px 14px; align-self: flex-start; }

/* Mọi nút của WooCommerce dùng chung một kiểu với nút của theme. */
body.tpl-san a.button, body.tpl-san button.button, body.tpl-san input.button,
body.tpl-san .button.alt, body.tpl-san #place_order {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 44px; border: 1px solid var(--tpl-cam); border-radius: var(--tpl-r);
	padding: 0 20px; background: var(--tpl-cam); color: #fff;
	font-family: var(--tpl-sans); font-size: 14.5px; font-weight: 600; line-height: 1;
	white-space: nowrap; text-transform: none; text-decoration: none;
	transition: background .18s ease, border-color .18s ease;
}
body.tpl-san a.button:hover, body.tpl-san button.button:hover, body.tpl-san input.button:hover,
body.tpl-san .button.alt:hover, body.tpl-san #place_order:hover {
	background: var(--tpl-cam-dam); border-color: var(--tpl-cam-dam); color: #fff;
}

/* PHÂN TRANG — mọi luật phải kèm `nav`.
   WooCommerce khai `.woocommerce nav.woocommerce-pagination ul li span.current
   { background: #e9e6ed; color: #816f98 }` — (0,3,4), hơn luật thiếu `nav` của
   theme con (0,3,2). Hậu quả: số trang đang xem ra TÍM trên nền xám nhạt.
   Thêm `nav` + `ul li` là (0,3,5), đủ thắng. Nhớ đè cả `ul` (nó khai `border`,
   `display: inline-block`) và `li` (`float: left`, `border-right`). */
body.tpl-san .woocommerce-pagination { grid-column: 1 / -1; margin-top: 38px; }
body.tpl-san nav.woocommerce-pagination ul {
	display: flex; justify-content: center; gap: 7px; margin: 0; padding: 0; border: 0;
}
body.tpl-san nav.woocommerce-pagination ul li { float: none; border: 0; overflow: visible; }
body.tpl-san nav.woocommerce-pagination ul li a,
body.tpl-san nav.woocommerce-pagination ul li span {
	min-width: 40px; height: 40px; display: inline-grid; place-items: center; padding: 0;
	border: 1px solid var(--tpl-vien); border-radius: var(--tpl-r-sm);
	background: var(--tpl-mat); color: var(--tpl-muc); font-size: 14.5px; font-weight: 700;
}
body.tpl-san nav.woocommerce-pagination ul li a:hover,
body.tpl-san nav.woocommerce-pagination ul li a:focus {
	background: var(--tpl-cam-mo); border-color: var(--tpl-cam); color: var(--tpl-cam);
}
body.tpl-san nav.woocommerce-pagination ul li span.current {
	background: var(--tpl-cam); border-color: var(--tpl-cam); color: #fff;
}

/* =====================================================================
 * TRANG CHI TIẾT TIN ĐĂNG
 * ===================================================================== */
.tpl-tin__vt { display: flex; align-items: center; gap: 7px; margin: 12px 0 0;
	color: var(--tpl-tren-than); font-size: 14.5px; }
.tpl-tin__vt svg { width: 16px; height: 16px; }
.tpl-tin__wrap { padding: 34px 0 var(--tpl-pad); }

body.tpl-san div.product { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(26px, 4vw, 52px); }
body.tpl-san div.product div.images, body.tpl-san div.product div.summary {
	float: none; width: 100%; margin: 0; min-width: 0;
}
body.tpl-san div.product div.images img { border-radius: var(--tpl-r); }
body.tpl-san div.product .woocommerce-product-gallery__wrapper { margin: 0; }
body.tpl-san div.product p.price, body.tpl-san div.product span.price {
	margin: 0 0 14px; color: var(--tpl-cam);
	font-family: var(--tpl-hep); font-size: 40px; font-weight: 700; line-height: 1.05;
}
body.tpl-san div.product p.price del { margin-right: 10px; color: var(--tpl-mo); font-size: 26px; opacity: 1; }
body.tpl-san div.product p.price ins { text-decoration: none; color: var(--tpl-cam); }
body.tpl-san div.product .woocommerce-product-details__short-description {
	margin: 0 0 20px; color: var(--tpl-mo); font-size: 16px;
}

.tpl-ts { margin: 0 0 22px; border: 1px solid var(--tpl-vien); border-radius: var(--tpl-r); background: var(--tpl-mat); }
.tpl-ts__h { padding: 13px 16px; border-bottom: 1px solid var(--tpl-vien);
	background: var(--tpl-nen); font-size: 18px; }
.tpl-ts__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 0; }
.tpl-ts__grid > div { padding: 12px 16px; border-top: 1px solid var(--tpl-vien); min-width: 0; }
.tpl-ts__grid > div:nth-child(-n+2) { border-top: 0; }
.tpl-ts__grid > div:nth-child(2n) { border-left: 1px solid var(--tpl-vien); }
.tpl-ts dt { color: var(--tpl-mo); font-size: 11.5px; font-weight: 700;
	letter-spacing: .1em; text-transform: uppercase; }
.tpl-ts dd { margin: 3px 0 0; font-family: var(--tpl-hep); font-size: 20px; font-weight: 600; }

.tpl-mg { padding: 20px; border: 1px solid var(--tpl-vien); border-top: 3px solid var(--tpl-cam);
	border-radius: var(--tpl-r); background: var(--tpl-mat); }
.tpl-mg__vai { margin: 0; font-family: var(--tpl-hep); font-size: 22px; font-weight: 700; }
.tpl-mg__note { margin: 8px 0 16px; color: var(--tpl-mo); font-size: 13.5px; }
.tpl-mg__nut { display: flex; flex-wrap: wrap; gap: 10px; }

/* HÀNG THẺ "MÔ TẢ" — mọi luật phải kèm `div.product`.
   WooCommerce khai cả bộ thẻ dưới `.woocommerce div.product …`, tức (0,4,3)
   tới (0,5,4), và `woocommerce.css` nạp SAU `style.css` của theme con. Luật
   thiếu `div.product` chỉ (0,3,3)–(0,4,4) nên thua sạch: hàng thẻ giữ nguyên
   nền xám `#e9e6ed`, chữ xám `#515151`, hai cái nhú ở chân thẻ.
   Sửa nửa vời còn tệ hơn: khai `color: #fff` cho thẻ đang mở mà quên
   `background` thì chữ trắng nằm trên nền trắng, thẻ thành ô rỗng. */
body.tpl-san .woocommerce-tabs { margin-top: 46px; }
body.tpl-san div.product .woocommerce-tabs ul.tabs {
	display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 20px; padding: 0;
	border-bottom: 1px solid var(--tpl-vien);
}
body.tpl-san div.product .woocommerce-tabs ul.tabs::before,
body.tpl-san div.product .woocommerce-tabs ul.tabs li::before,
body.tpl-san div.product .woocommerce-tabs ul.tabs li::after { display: none; }
body.tpl-san div.product .woocommerce-tabs ul.tabs li {
	margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent;
}
body.tpl-san div.product .woocommerce-tabs ul.tabs li a {
	display: block; padding: 10px 18px; color: var(--tpl-mo);
	font-family: var(--tpl-sans); font-size: 14.5px; font-weight: 600; text-decoration: none;
}
body.tpl-san div.product .woocommerce-tabs ul.tabs li a:hover { color: var(--tpl-cam); }
body.tpl-san div.product .woocommerce-tabs ul.tabs li.active { background: var(--tpl-than); }
body.tpl-san div.product .woocommerce-tabs ul.tabs li.active a { color: #fff; }

/* WooCommerce gắn thêm lớp `entry-content` cho khung thẻ Mô tả, mà theme mẹ
   khai `.entry-content { color: #2c2824 }`. Đoạn văn có luật riêng đè được,
   nhưng `h2` dùng `color: inherit` nên thừa kế đúng màu lạ. Đặt màu ở KHUNG. */
body.tpl-san .woocommerce-Tabs-panel { color: var(--tpl-muc); }
body.tpl-san .woocommerce-Tabs-panel h2 { margin: 0 0 12px; font-size: 26px; }
body.tpl-san .woocommerce-Tabs-panel p { max-width: 78ch; margin: 0 0 14px; color: var(--tpl-mo); font-size: 16px; }

body.tpl-san .related > h2, body.tpl-san .upsells > h2 {
	margin: 0 0 22px; font-size: clamp(26px, 3vw, 34px);
}
body.tpl-san .related, body.tpl-san .upsells { margin-top: 52px; }

/* =====================================================================
 * TRANG GIỚI THIỆU
 * ===================================================================== */
.tpl-gt__top { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(26px, 4vw, 52px); align-items: start; }
.tpl-gt__van h2 { margin: 30px 0 10px; font-size: 28px; }
.tpl-gt__van h2:first-child { margin-top: 0; }
.tpl-gt__van p { margin: 0 0 14px; max-width: 72ch; color: var(--tpl-mo); font-size: 16px; }
.tpl-gt__ben img { border-radius: var(--tpl-r); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.tpl-gt__hop { margin-top: 18px; padding: 20px; border: 1px solid var(--tpl-vien);
	border-top: 3px solid var(--tpl-cam); border-radius: var(--tpl-r); background: var(--tpl-mat); }
.tpl-gt__hop h2 { font-size: 22px; }
.tpl-gt__hop ul { margin: 14px 0 18px; padding: 0; list-style: none; }
.tpl-gt__hop li { display: flex; flex-direction: column; gap: 2px; padding: 10px 0;
	border-top: 1px solid var(--tpl-vien); }
.tpl-gt__hop li:first-child { border-top: 0; padding-top: 0; }
.tpl-gt__hop strong { color: var(--tpl-mo); font-size: 11.5px; font-weight: 700;
	letter-spacing: .1em; text-transform: uppercase; }
.tpl-gt__hop a, .tpl-gt__hop span { font-family: var(--tpl-hep); font-size: 20px; font-weight: 600; }
body.tpl-san .tpl-gt__hop a:hover { color: var(--tpl-cam); }

.tpl-gt__cam { margin-top: clamp(40px, 5vw, 64px); }
.tpl-gt__cam > h2 { margin-bottom: 20px; font-size: 28px; }
.tpl-gt__cam-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.tpl-gt__cam-grid > div { padding: 20px; border-left: 3px solid var(--tpl-cam);
	background: var(--tpl-mat); border-radius: 0 var(--tpl-r) var(--tpl-r) 0; }
.tpl-gt__cam-grid h3 { margin-bottom: 8px; font-size: 20px; }
.tpl-gt__cam-grid p { margin: 0; color: var(--tpl-mo); font-size: 14.5px; }

/* =====================================================================
 * TRANG LIÊN HỆ
 * ===================================================================== */
.tpl-lh__grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(26px, 4vw, 52px); align-items: start; }
.tpl-lh__cot h2 { margin-bottom: 18px; font-size: 28px; }
.tpl-lh__kenh { margin: 0 0 22px; padding: 0; list-style: none; display: grid; gap: 12px; }
.tpl-lh__kenh li { display: flex; gap: 14px; padding: 18px;
	border: 1px solid var(--tpl-vien); border-radius: var(--tpl-r); background: var(--tpl-mat); }
.tpl-lh__icon { display: inline-grid; place-items: center; flex: none; width: 42px; height: 42px;
	border-radius: var(--tpl-r-sm); background: var(--tpl-cam-mo); color: var(--tpl-cam); }
.tpl-lh__icon svg { width: 22px; height: 22px; }
.tpl-lh__kenh strong { display: block; color: var(--tpl-mo); font-size: 11.5px; font-weight: 700;
	letter-spacing: .1em; text-transform: uppercase; }
.tpl-lh__kenh > li > div > a, .tpl-lh__kenh > li > div > span {
	display: block; margin-top: 2px; font-family: var(--tpl-hep); font-size: 21px; font-weight: 600;
}
.tpl-lh__kenh > li > div > a:hover { color: var(--tpl-cam); }
.tpl-lh__kenh p { margin: 5px 0 0; color: var(--tpl-mo); font-size: 13.5px; }

.tpl-lh__hop { padding: 20px; border-left: 3px solid var(--tpl-cam);
	background: var(--tpl-nen-2); border-radius: 0 var(--tpl-r) var(--tpl-r) 0; }
.tpl-lh__hop h3 { font-size: 19px; }
.tpl-lh__hop ul { margin: 10px 0 0; padding-left: 18px; color: var(--tpl-mo); font-size: 14.5px; }
.tpl-lh__hop li + li { margin-top: 5px; }

.tpl-lh__cot--form { padding: 24px; border: 1px solid var(--tpl-vien);
	border-top: 3px solid var(--tpl-cam); border-radius: var(--tpl-r); background: var(--tpl-mat); }
.tpl-lh__note { margin: -8px 0 18px; color: var(--tpl-mo); font-size: 13.5px; }
.tpl-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tpl-form__o { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tpl-form__o--rong { grid-column: 1 / -1; }
.tpl-form label { color: var(--tpl-mo); font-size: 11.5px; font-weight: 700;
	letter-spacing: .1em; text-transform: uppercase; }
.tpl-form input, .tpl-form select, .tpl-form textarea {
	min-height: 46px; min-width: 0; padding: 11px 12px;
	border: 1px solid var(--tpl-vien); border-radius: var(--tpl-r-sm);
	background: var(--tpl-mat); color: var(--tpl-muc); font-size: 15.5px;
}
.tpl-form textarea { resize: vertical; }
.tpl-form input:focus, .tpl-form select:focus, .tpl-form textarea:focus {
	outline: 0; border-color: var(--tpl-cam);
}
.tpl-form .tpl-btn { grid-column: 1 / -1; justify-self: start; }

/* =====================================================================
 * CHÂN TRANG
 * ===================================================================== */
.tpl-foot { background: var(--tpl-than); color: var(--tpl-sang-mo); }
.tpl-foot__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr;
	gap: 30px; padding: clamp(44px, 5vw, 68px) 0; }
.tpl-brand--foot .tpl-brand__name { color: #fff; }
.tpl-brand--foot .tpl-brand__tag { color: var(--tpl-sang-mo); }
.tpl-foot__desc { margin: 16px 0 0; color: var(--tpl-sang-mo); font-size: 14.5px; }
.tpl-foot__lh { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.tpl-foot__lh li { display: flex; align-items: center; gap: 9px; font-size: 14.5px; }
.tpl-foot__lh svg { width: 18px; height: 18px; flex: none; color: var(--tpl-cam-sang); }
body.tpl-san .tpl-foot__lh a { color: #fff; font-weight: 600; }
body.tpl-san .tpl-foot__lh a:hover { color: var(--tpl-cam-sang); }

.tpl-foot__col h2 { margin-bottom: 14px; color: #fff; font-size: 19px;
	letter-spacing: .06em; text-transform: uppercase; }
.tpl-foot__col ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.tpl-foot__col a { font-size: 14.5px; }
.tpl-foot__col a span { position: relative; }
body.tpl-san .tpl-foot__col a:hover { color: #fff; }
.tpl-foot__col a:hover span::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background: currentColor;
}

.tpl-sub { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tpl-sub__in {
	flex: 1 1 170px; min-width: 0; height: 46px; padding: 0 12px;
	border: 1px solid var(--tpl-vien-toi); border-radius: var(--tpl-r-sm);
	background: var(--tpl-than-3); color: #fff; font-size: 15px;
}
.tpl-sub__in::placeholder { color: var(--tpl-sang-mo); opacity: 1; }
.tpl-sub__in:focus { outline: 0; border-color: var(--tpl-cam-sang); }
.tpl-sub__go {
	flex: none; height: 46px; padding: 0 18px;
	border: 1px solid var(--tpl-cam); border-radius: var(--tpl-r-sm);
	background: var(--tpl-cam); color: #fff; font-size: 14.5px; font-weight: 600; cursor: pointer;
}
.tpl-sub__go:hover { background: var(--tpl-cam-dam); border-color: var(--tpl-cam-dam); }
.tpl-sub__note { margin: 10px 0 0; color: var(--tpl-sang-mo); font-size: 12.5px; }

.tpl-foot__bot { border-top: 1px solid rgba(255, 255, 255, .12); padding: 18px 0 26px; }
.tpl-foot__bot p { margin: 0; color: var(--tpl-sang-mo); font-size: 13px; }
.tpl-foot__bot p + p { margin-top: 5px; }
body.tpl-san .tpl-foot__bot a { color: #fff; text-decoration: underline; }

.tpl-toast {
	position: fixed; z-index: 90; left: 50%; bottom: 20px; transform: translateX(-50%);
	width: min(560px, calc(100% - 32px)); padding: 14px 18px;
	border-left: 3px solid var(--tpl-cam); border-radius: var(--tpl-r);
	background: var(--tpl-than-2); color: #fff; font-size: 14px; box-shadow: var(--tpl-bong-2);
}

/* =====================================================================
 * GIỎ HÀNG, THANH TOÁN, TÀI KHOẢN — thành phần dựng bằng BLOCK
 *
 * Mẫu này chạy chế độ danh mục nên ba trang ấy luôn rỗng, nhưng chúng vẫn mở
 * được bằng địa chỉ và vẫn phải mang đúng màu thương hiệu. WooCommerce 8 trở
 * đi dựng chúng bằng *block*, lấy màu từ `theme.json` chứ không từ CSS của
 * theme con, nên nút mặc định ra xanh dương.
 * ===================================================================== */
body.tpl-san .wc-block-components-button:not(.is-link),
body.tpl-san .wc-block-cart__submit-button,
body.tpl-san .wc-block-components-checkout-place-order-button {
	border-radius: var(--tpl-r); background: var(--tpl-cam); color: #fff;
	font-family: var(--tpl-sans); font-weight: 600; text-decoration: none;
}
body.tpl-san .wc-block-components-button:not(.is-link):hover,
body.tpl-san .wc-block-cart__submit-button:hover,
body.tpl-san .wc-block-components-checkout-place-order-button:hover {
	background: var(--tpl-cam-dam); color: #fff;
}
body.tpl-san .wc-block-components-totals-item__value,
body.tpl-san .wc-block-components-product-price { color: var(--tpl-muc); font-weight: 700; }
body.tpl-san .wc-block-cart-items__row { border-color: var(--tpl-vien); }
body.tpl-san .wc-block-components-product-name { color: var(--tpl-muc); font-weight: 600; }
body.tpl-san .wc-block-components-product-name:hover { color: var(--tpl-cam); }
body.tpl-san .wc-block-components-text-input input,
body.tpl-san .wc-block-components-address-form input,
body.tpl-san .wc-block-components-quantity-selector { border-radius: var(--tpl-r-sm); }
body.tpl-san .wc-block-components-panel__button { color: var(--tpl-muc); }
body.tpl-san .wc-block-components-sidebar .wc-block-components-panel,
body.tpl-san .wp-block-woocommerce-cart-order-summary-block {
	background: var(--tpl-mat); border-radius: var(--tpl-r);
}
body.tpl-san .wc-block-components-notice-banner,
body.tpl-san .wc-block-components-notice-banner__content { color: var(--tpl-muc); }
body.tpl-san .wc-block-components-notice-banner.is-error { border-color: var(--tpl-cam-dam); }
body.tpl-san .wc-block-components-notice-banner.is-success,
body.tpl-san .wc-block-components-notice-banner.is-info { border-color: var(--tpl-cam); }
body.tpl-san .wc-block-components-notice-banner a { color: var(--tpl-cam); }

/* Nút của khối sản phẩm (hiện ở dải bán kèm trên trang Giỏ hàng). Nó là
   `.wp-block-button__link`, KHÔNG phải `.button` của WooCommerce cổ điển, nên
   luật nút ở trên không với tới — đo được 3,33:1 trước khi khai riêng. */
body.tpl-san .wp-block-button__link,
body.tpl-san .wc-block-components-product-button .wp-block-button__link {
	border: 1px solid var(--tpl-cam); border-radius: var(--tpl-r);
	background: var(--tpl-cam); color: #fff;
	font-family: var(--tpl-sans); font-size: 14.5px; font-weight: 600; text-decoration: none;
}
body.tpl-san .wp-block-button__link:hover,
body.tpl-san .wc-block-components-product-button .wp-block-button__link:hover {
	background: var(--tpl-cam-dam); border-color: var(--tpl-cam-dam); color: #fff;
}

/*
 * BẢNG GIỎ HÀNG TRÀN NGANG KHI GIỎ CÓ HÀNG.
 *
 * WooCommerce khai `.wc-block-cart table.wc-block-cart-items
 * .wc-block-cart-items__row { grid-template-columns: 80px 132px }` — chỉ HAI
 * rãnh cho BA ô, ô thành tiền rơi vào rãnh ngầm cỡ tự do; cộng hai khe 16px là
 * rộng hơn khung điện thoại. Bộ chọn (0,3,1) nên luật hai lớp của theme thua.
 *
 * Giỏ của mẫu này luôn rỗng (chế độ danh mục), nên lỗi không bao giờ lộ ra ở
 * đây — nhưng khai sẵn thì ai bật lại phần bán hàng cũng không dính.
 *
 * Cẩn thận: đặt `table-layout: fixed` mà KHÔNG khai đủ ba rãnh thì hết tràn
 * nhưng ô thành tiền co còn một mẩu và giá đè lên tên hàng.
 */
@media (max-width: 600px) {
	body.tpl-san table.wc-block-cart-items { table-layout: fixed; width: 100%; }
	body.tpl-san .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row {
		grid-template-columns: 68px minmax(0, 1fr) auto; column-gap: 12px;
	}
	body.tpl-san .wc-block-cart-item__image { width: 68px; }
	body.tpl-san .wc-block-cart-item__image img { width: 100%; height: auto; }
	body.tpl-san .wc-block-cart-item__product,
	body.tpl-san .wc-block-cart-item__total { min-width: 0; }
}

/* Dải thông báo CỔ ĐIỂN (khác hẳn bản khối ở trên — phải khai cả hai).
   Nút "Xem giỏ hàng" bị WooCommerce cho `float: right` nên màn hình hẹp thì
   đè lên dòng chữ; dựng lại thành hàng flex biết xuống dòng. */
body.tpl-san .woocommerce-message, body.tpl-san .woocommerce-info,
body.tpl-san .woocommerce-error {
	display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
	border-top: 3px solid var(--tpl-cam); border-radius: var(--tpl-r);
	background: var(--tpl-nen-2); color: var(--tpl-muc); list-style: none;
}
body.tpl-san .woocommerce-error { border-top-color: var(--tpl-cam-dam); }
body.tpl-san .woocommerce-message::before, body.tpl-san .woocommerce-info::before,
body.tpl-san .woocommerce-error::before { color: var(--tpl-cam); }
/* `:not(.button)` là bắt buộc: luật `.woocommerce-message a` (0,2,2) BẰNG ĐIỂM
   với luật nút `a.button` và nằm sau, nên nó sơn màu nhấn lên nút nền màu
   nhấn — nút tàng hình, 1,00:1. */
body.tpl-san .woocommerce-message a:not(.button),
body.tpl-san .woocommerce-info a:not(.button) { color: var(--tpl-cam); }
body.tpl-san .woocommerce-message a.button, body.tpl-san .woocommerce-info a.button {
	float: none; margin-left: auto; color: #fff;
}

/* Dấu sao "bắt buộc": `.woocommerce form .form-row .required` là (0,3,2). */
body.tpl-san form .form-row .required,
body.tpl-san .required { color: var(--tpl-cam-dam); }

body.tpl-san .woocommerce-breadcrumb { display: none; }

/* =====================================================================
 * BỀ NGANG NHỎ DẦN
 * Thứ tự các khối @media có ý nghĩa: cùng độ ưu tiên thì khối ĐỨNG SAU thắng,
 * nên khối hẹp nhất phải nằm cuối.
 * ===================================================================== */
@media (max-width: 1180px) {
	body.tpl-san ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.tpl-mgs, .tpl-qt, .tpl-gt__cam-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.tpl-foot__grid { grid-template-columns: 1.4fr 1fr 1fr; }
	.tpl-foot__news { grid-column: 1 / -1; }
}

@media (max-width: 1040px) {
	.tpl-nav { display: none; }
	.tpl-burger { display: inline-grid; }
	.tpl-nav + .tpl-tools { margin-left: auto; }
	.tpl-head__row { justify-content: space-between; }
	.tpl-tim { grid-template-columns: 1fr 1fr; }
	.tpl-tim__o--rong { grid-column: 1 / -1; }
	.tpl-tim .tpl-btn { grid-column: 1 / -1; }
	body.tpl-san div.product { grid-template-columns: 1fr; }
	.tpl-gt__top, .tpl-lh__grid { grid-template-columns: 1fr; }
	.tpl-nhom { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
	.tpl-so__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.tpl-so__grid > div { padding: 18px 16px; border-top: 1px solid rgba(255, 255, 255, .14); }
	.tpl-so__grid > div:nth-child(-n+2) { border-top: 0; }
	.tpl-so__grid > div:nth-child(2n) { padding-left: 20px; border-left: 1px solid rgba(255, 255, 255, .14); }
	.tpl-so__grid > div:nth-child(2n+1) { border-left: 0; padding-left: 0; }
	.tpl-so strong { font-size: 30px; }
	.tpl-util__note { display: none; }
	.tpl-util__in { justify-content: flex-end; }
}

@media (max-width: 760px) {
	body.tpl-san ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
	body.tpl-san ul.products li.product .woocommerce-loop-product__title { font-size: 17.5px; padding: 12px 12px 0; }
	body.tpl-san ul.products li.product .price { font-size: 20px; padding: 5px 12px 0; }
	.tpl-the__ts, .tpl-the__vt { padding-inline: 12px; }
	body.tpl-san ul.products li.product .tpl-btn--nho { margin: 12px; }
	.tpl-nhom { grid-template-columns: 1fr; }
	.tpl-mgs, .tpl-qt, .tpl-gt__cam-grid { grid-template-columns: 1fr; }
	.tpl-foot__grid { grid-template-columns: 1fr; gap: 26px; }
	.tpl-foot__news { grid-column: auto; }
	.tpl-form { grid-template-columns: 1fr; }
	.tpl-goi span { display: none; }
	body.tpl-san .tpl-goi { padding: 0 13px; }
	body.tpl-san div.product p.price, body.tpl-san div.product span.price { font-size: 32px; }
	.tpl-ts__grid { grid-template-columns: 1fr; }
	.tpl-ts__grid > div:nth-child(2n) { border-left: 0; }
	.tpl-ts__grid > div:nth-child(2) { border-top: 1px solid var(--tpl-vien); }
}

/* Mốc hẹp nhất: 320px (iPhone SE đời đầu, Galaxy Fold lúc gập). Dừng ở 360px
   là bỏ sót — ở 320px khung chỉ còn 288px, ba thành phần công cụ của đầu trang
   đủ sức lòi ra ngoài. PHẢI đặt SAU khối 760px, nếu không khối ấy ghi đè lại. */
@media (max-width: 420px) {
	:root { --tpl-gut: 14px; }
	.tpl-brand__name { font-size: 20px; }
	.tpl-brand__tag { font-size: 9.5px; letter-spacing: .1em; }
	.tpl-brand { gap: 8px; }
	.tpl-brand__mark svg { width: 32px; height: 32px; }
	.tpl-tools { gap: 6px; }
	.tpl-stool, .tpl-burger { width: 36px; height: 36px; }
	body.tpl-san .tpl-goi { height: 36px; padding: 0 10px; }
	.tpl-goi svg { width: 15px; height: 15px; }
	.tpl-head__row { min-height: 62px; gap: 10px; }
	/* Lưới GIỮ HAI CỘT tới tận 340px. Một sàn giao dịch sống bằng mật độ: một
	   cột ở 375px kéo mười lăm tin thành một dải cuộn dài gấp đôi. Chỉ dưới
	   340px — nơi thẻ co còn hẹp hơn 150px — mới rút về một cột. */
	.tpl-util { font-size: 12px; }
	.tpl-hero__h1 { font-size: 34px; }
	.tpl-tim { grid-template-columns: 1fr; padding: 14px; }
	.tpl-so__grid { grid-template-columns: 1fr; }
	.tpl-so__grid > div:nth-child(2n) { padding-left: 0; border-left: 0; }
	.tpl-so__grid > div:nth-child(2) { border-top: 1px solid rgba(255, 255, 255, .14); }
	.tpl-cta__nut { width: 100%; }
	.tpl-cta__nut .tpl-btn { flex: 1 1 100%; }
}

/* =====================================================================
 * TRANG 404 VÀ TRANG TÌM KIẾM CHUNG — dùng mẫu của THEME MẸ
 *
 * Theme này không có `404.php` và `search.php` riêng. Nhờ `body.tpl-san` và
 * luật `.vs-scope` ở đầu tệp, hai trang ấy đã có đúng đầu trang, chân trang,
 * phông và cỡ chữ của mẫu — chỉ còn mấy thành phần dùng lớp dựng sẵn của theme
 * mẹ là lạc màu.
 *
 * VÀ ĐÂY LÀ CHỖ ÁNH XẠ BIẾN KHÔNG LÀM ĐƯỢC: ánh xạ đổi được NỀN của nút, còn
 * màu CHỮ thì `a { color: inherit }` của theme con nuốt mất `color: #fff` của
 * theme mẹ. Nút đặc màu nhấn, chữ màu mực — ở mẫu khác đo được 1,34:1, gần như
 * vô hình. Phải khai `color` riêng như dưới đây.
 * ===================================================================== */
body.tpl-san .vs-eyebrow { color: var(--tpl-cam); }
body.tpl-san .vs-btn { border-radius: var(--tpl-r); font-family: var(--tpl-sans); font-weight: 600; }
body.tpl-san .vs-btn--primary { background: var(--tpl-cam); border-color: var(--tpl-cam); color: #fff; }
body.tpl-san .vs-btn--primary:hover { background: var(--tpl-cam-dam); border-color: var(--tpl-cam-dam); color: #fff; }
body.tpl-san .vs-btn--outline { border-color: var(--tpl-than); color: var(--tpl-muc); background: transparent; }
body.tpl-san .vs-btn--outline:hover { background: var(--tpl-than); border-color: var(--tpl-than); color: #fff; }

/* Biểu mẫu tìm kiếm của theme mẹ xếp ô nhập và nút trên MỘT HÀNG KHÔNG XUỐNG
   DÒNG — ở 360px nút bị đẩy lòi ra khỏi khung, và đây là chỗ tràn ngang duy
   nhất của cả site ở các mẫu trước, chỉ lộ ra khi đo trang 404.
   `min-width: 0` là mấu chốt: phần tử con của flex mặc định `min-width: auto`
   nên ô nhập không chịu co lại dưới bề rộng nội dung của nó. */
body.tpl-san .search-form { display: flex; flex-wrap: wrap; gap: 10px; }
body.tpl-san .search-field {
	flex: 1 1 180px; min-width: 0;
	border: 1px solid var(--tpl-vien); border-radius: var(--tpl-r);
	background: var(--tpl-mat); color: var(--tpl-muc);
}
body.tpl-san .search-field:focus { outline: 0; border-color: var(--tpl-cam); }
body.tpl-san .search-submit {
	flex: none; border: 1px solid var(--tpl-cam); border-radius: var(--tpl-r);
	background: var(--tpl-cam); color: #fff; font-weight: 600;
}
body.tpl-san .search-submit:hover { background: var(--tpl-cam-dam); border-color: var(--tpl-cam-dam); }

/* =====================================================================
 * HIỆN DẦN
 * Lớp `tpl-an` do KỊCH BẢN gắn vào, không viết sẵn trong HTML — tắt JavaScript
 * thì trang vẫn hiện đầy đủ.
 * ===================================================================== */
.tpl-an { opacity: 0; transform: translateY(14px); }
.tpl-hien { opacity: 1; transform: none; transition: opacity .5s ease, transform .5s ease; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.tpl-an { opacity: 1; transform: none; }
	*, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Hẹp hơn cả 320px thì hai cột không còn đọc được: thẻ chỉ rộng khoảng 145px,
   giá mười chữ số tràn ra ngoài. Khối này phải nằm CUỐI tệp để thắng khối
   420px ở trên — cùng độ ưu tiên thì khối đứng sau thắng. */
@media (max-width: 340px) {
	body.tpl-san ul.products { grid-template-columns: 1fr; }
}
