/*!
 * POTECH — base typography + component của pattern library.
 *
 * MỌI selector đều bọc trong `html.potech-pattern`. Lý do không để trần:
 *
 *   - Theme này nạp Bootstrap. `.btn`, `.pill`, `h1`, `a`, `p` đều đã có chủ.
 *     Ghi đè trần thì không cách nào biết chỗ nào vỡ, mà bản dựng lại là thứ
 *     phải so được từng trang với bản gốc.
 *   - Bọc như vậy cũng là công tắc: bật cho một trang thì thêm class ở
 *     `body_class`; bật cho cả site thì bỏ điều kiện trong inc/pattern.php,
 *     không phải sửa CSS.
 *
 * Độ đặc hiệu: `html.potech-pattern .btn` = (0,2,1) > `.btn` của Bootstrap
 * (0,1,0), nên thắng mà không cần `!important` chỗ nào.
 *
 * Hai chỗ trong ui_kit gốc cố ý KHÔNG chép sang:
 *   - `* { box-sizing: border-box }` — Bootstrap đặt rồi.
 *   - `html, body { margin: 0; padding: 0 }` — đặt lại sẽ phá layout theme.
 */

/* ==========================================================================
   BASE TYPOGRAPHY
   ========================================================================== */

html.potech-pattern body {
  font-family: var(--font-text);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--fg);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Hai bề mặt trình duyệt hay bị bỏ quên — bôi đen và con nháy — cũng thuộc
   bộ nhận diện: bôi đen nền xanh nhạt (giữ chữ ink-900 đọc được), con nháy
   trong form màu xanh kỹ thuật. */
html.potech-pattern ::selection {
  background: var(--potech-blue-100);
  color: var(--ink-900);
}
html.potech-pattern input,
html.potech-pattern select,
html.potech-pattern textarea {
  caret-color: var(--potech-blue);
}

/* Tiêu đề — condensed in hoa, "giọng" của POTECH */
html.potech-pattern h1, html.potech-pattern .h1,
html.potech-pattern h2, html.potech-pattern .h2,
html.potech-pattern h3, html.potech-pattern .h3 {
  font-family: var(--font-display);
  color: var(--ink-900);
  font-weight: 700;
  letter-spacing: var(--tracking-display);
  line-height: var(--lh-tight);
  text-wrap: balance;
  margin: 0;
}

html.potech-pattern h1, html.potech-pattern .h1 {
  font-size: var(--fs-h1);
  text-transform: uppercase;
  letter-spacing: 0.005em;
}
html.potech-pattern h2, html.potech-pattern .h2 {
  font-size: var(--fs-h2);
  text-transform: uppercase;
}
html.potech-pattern h3, html.potech-pattern .h3 {
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: var(--lh-snug);
}
/* .h5 va .h6 phai co, khong duoc bo trong: theme dat class tien ich len the
   that — vi du `<h2 class="entry-title h5">` cho tieu de bai viet trong
   danh sach. Thieu quy tac cho `.h5` thi quy tac theo THE thang (do dac
   hieu (0,1,1) so voi (0,1,0) cua `.h5` goc), va tieu de bai viet duoc in o
   co h2 = 44px. Viet duoi dang `html.potech-pattern .h5` = (0,2,1) de lop
   tien ich khai bao ro rang luon thang the. Co theo thang Bootstrap ma
   theme dang gia dinh: h4 24, h5 20, h6 16. */
html.potech-pattern .h5 { font-size: 20px; }
html.potech-pattern .h6 { font-size: 16px; }
html.potech-pattern h4, html.potech-pattern .h4 {
  font-family: var(--font-text);
  font-size: var(--fs-h4);
  font-weight: 600;
  line-height: var(--lh-snug);
  margin: 0;
}

html.potech-pattern .display {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-display);
  line-height: 0.95;
  letter-spacing: var(--tracking-display);
  text-transform: uppercase;
}

/* KHONG dat `max-width: 64ch` o day. Do dai dong doc cua design system chi
   dung cho van xuoi; trong WordPress thi <p> con lam o luoi, bao ngoai anh va
   cell trong bo cuc cot. Do duoc tren trang chu: mot <p> rong lot vao trong
   `.row` (flex) — khong khoa be rong thi no an tron 1220px va chiem tron mot
   dong, vo hai; khoa 64ch thi no chi con 579px, chia doi dong voi cot video va
   day cot do lech 32px, de lai mang trong ben trai.
   Cac thanh phan cua trang mau tu khai bao be rong doc rieng. */
html.potech-pattern p {
  margin: 0 0 var(--space-4);
  text-wrap: pretty;
}

/* Eyebrow — nhãn chữ hoa giãn, đứng trên tiêu đề mục */
html.potech-pattern .eyebrow {
  font-family: var(--font-text);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--potech-blue);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
html.potech-pattern .eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--potech-red);
}

/* Chữ nhấn đỏ trong đoạn văn (thay inline #d71818 cũ của front-page — màu đỏ
   thứ hai lệch token). -700 vì đây là chữ cỡ body trên nền trắng. */
html.potech-pattern .text-accent {
  color: var(--potech-red-700);
}

html.potech-pattern .caps-label {
  font-family: var(--font-text);
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  /* -700: 14px là chữ nhỏ theo WCAG, đỏ tươi trên trắng chỉ 4.38. */
  color: var(--potech-red-700);
}

/* Số kỹ thuật: mã hàng, thông số, số điện thoại. Không đổi mặt chữ, chỉ bật
   tabular figure để cột số thẳng hàng và số 0 giữ dáng oval thường. */
html.potech-pattern code,
html.potech-pattern kbd,
html.potech-pattern .mono,
html.potech-pattern .num {
  font-family: var(--font-mono);
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "zero" 0;
}
html.potech-pattern .num-inline {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "zero" 0;
}

/* Gạch chân link bằng `text-decoration`, KHÔNG bằng `border-bottom`.

   Bản đầu ở đây dùng `border-bottom: 1px solid transparent` rồi hover đổi màu
   viền. Cách đó chỉ đúng cho link CHỮ nằm trong đoạn văn. Với link dạng KHỐI —
   card, mục menu, ô danh mục — `border-bottom` kẻ ngang HẾT BỀ RỘNG HỘP, không
   liên quan gì tới chữ bên trong. Đã đếm trên /videos/: 64 trong 82 thẻ `<a>`
   của trang là khối rộng hơn 200px, tức toàn bộ số đó bị kẻ một vạch dài khi
   hover. Đây là lỗi toàn cục chứ không phải lỗi của một trang.

   Chỗ nhìn ra rõ nhất là card video: hover một card sinh ra BA đường kẻ —
   hai dòng tiêu đề bị `text-decoration: underline` của plugin
   (`video.css`: `.potech-video-card:hover .potech-video-name`), cộng một vạch
   dài 281px kẻ ngang chân card do quy tắc `border-bottom` ở đây.

   `text-decoration` gạch dưới CHỮ, không gạch dưới hộp: link khối bao ảnh không
   sinh đường kẻ nào (không có line box nào để vẽ), link khối có chữ thì gạch
   đúng phần chữ. Trên card video nó trùng khít với gạch của plugin nên vẽ một
   lần — ba đường về còn một.

   `text-decoration-color: transparent` lúc nghỉ để chuyển màu mượt như trước —
   `border-color` đổi được thì `text-decoration-color` cũng đổi được.

   `text-decoration-thickness: 1px` chốt cứng để bằng đúng vạch 1px cũ; `auto`
   thả cho mặt chữ tự quyết nên nét dày mỏng khác nhau theo cỡ chữ.

   `text-underline-offset: 0.18em` đẩy gạch xuống khỏi chân chữ. Đây là chuyện
   khoảng thở, KHÔNG phải chuyện dấu dưới của tiếng Việt: đã đo
   `text-decoration-skip-ink` là `auto` (mặc định), nên Chrome tự ngắt gạch chỗ
   nét chữ đi xuống (ụ, Ậ) dù offset bao nhiêu. */
html.potech-pattern a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color var(--dur-fast) var(--ease-out),
              text-decoration-color var(--dur-fast) var(--ease-out);
}
html.potech-pattern a:hover {
  color: var(--link-hover);
  text-decoration-color: currentColor;
}

/* Vòng focus bàn phím. Bundle cũ của theme có `a, a:hover, a:focus { outline:
   none }` (_global.scss) — giết chỉ báo focus trên MỌI link của site. Không
   build lại được bundle ở đây nên khôi phục từ lớp pattern: (0,2,1) thắng
   (0,1,1). Chỉ :focus-visible — chuột bấm không hiện vòng, bàn phím thì có.
   Form field không nằm trong danh sách này: chúng đã có viền + glow riêng ở
   phần form phía dưới, chồng thêm outline là thừa hai lớp. */
html.potech-pattern a:focus-visible,
html.potech-pattern button:focus-visible,
html.potech-pattern [role="button"]:focus-visible,
html.potech-pattern summary:focus-visible,
html.potech-pattern [tabindex]:focus-visible {
  outline: 2px solid var(--potech-blue);
  outline-offset: 2px;
}
/* main nhận focus từ skip link (tabindex="-1") — đích đến, không phải control;
   vẽ viền quanh cả trang nội dung thì chỉ gây hoang mang. */
html.potech-pattern main:focus-visible,
html.potech-pattern main:focus {
  outline: none;
}
/* Trên nền xanh đậm thì vòng xanh chìm mất — đổi sang trắng. Các bề mặt tối
   của theme cũ (.header-carousel, .contact-info…) xử lý bên theme.css. */
html.potech-pattern .potech-footer a:focus-visible,
html.potech-pattern .potech-capability a:focus-visible {
  outline-color: var(--paper);
}

/* Skip link — đứng đầu <body>, ẩn cho tới khi nhận focus bàn phím. Nền
   blue-900 + chữ trắng (8.95) nổi trên cả header trắng lẫn hero xanh. */
html.potech-pattern .potech-skip {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 200;
  padding: 12px 20px;
  background: var(--potech-blue-900);
  color: var(--fg-on-blue);
  font-family: var(--font-text);
  font-weight: 600;
  font-size: var(--fs-small);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  transform: translateY(-100%);
}
html.potech-pattern .potech-skip:focus,
html.potech-pattern .potech-skip:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--paper);
  outline-offset: -6px;
}

html.potech-pattern hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: var(--space-7) 0;
}

html.potech-pattern .rule-accent {
  border: 0;
  height: 2px;
  background: var(--potech-red);
  width: 48px;
  margin: var(--space-4) 0;
}

/* ==========================================================================
   NÚT
   ========================================================================== */

html.potech-pattern .btn {
  font-family: var(--font-text);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 11px 20px;
  border-radius: var(--radius-1);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--dur-base) var(--ease-out),
              color var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out);
}
html.potech-pattern .btn--lg { font-size: 14px; padding: 14px 24px; }
html.potech-pattern .btn--primary { background: var(--potech-blue); color: #fff; }
html.potech-pattern .btn--primary:hover { background: var(--potech-blue-700); color: #fff; }
html.potech-pattern .btn--primary:active { background: var(--potech-blue-900); }
html.potech-pattern .btn--ghost {
  background: transparent;
  color: var(--potech-blue);
  border-color: var(--potech-blue);
}
html.potech-pattern .btn--ghost:hover { background: var(--potech-blue-050); color: var(--potech-blue); }
html.potech-pattern .btn--link {
  background: transparent;
  /* Cặp -700 → -800 thay vì đỏ tươi → -700: chữ nút 13px cần 4.5:1 ở MỌI
     trạng thái (đỏ tươi 4.38 trượt), và -800 (7.80) đủ xa -700 để thấy hover. */
  color: var(--potech-red-700);
  border: 0;
  padding-left: 0;
  padding-right: 0;
}
html.potech-pattern .btn--link:hover { color: var(--potech-red-800); }
/* Nút là <a> thì gạch chân của quy tắc `a:hover` phía trên phải tắt. Tắt bằng
   `text-decoration-line: none` chứ không phải `border-bottom-color` nữa — quy
   tắc `a` đã đổi sang `text-decoration`. */
html.potech-pattern a.btn:hover { text-decoration-line: none; }
html.potech-pattern a.btn--ghost:hover { border-color: var(--potech-blue); }

/* ==========================================================================
   HEADER
   ========================================================================== */

html.potech-pattern .potech-header {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 18px 40px;
  background: #fff;
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 10;
}
html.potech-pattern .potech-header__brand img { height: 40px; display: block; }
html.potech-pattern .potech-header__nav { display: flex; gap: 28px; margin-left: auto; }
html.potech-pattern .potech-header__link {
  font-family: var(--font-text);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-700);
  border-bottom: 2px solid transparent;
  padding: 6px 0;
}
html.potech-pattern .potech-header__link:hover { color: var(--potech-blue); text-decoration-line: none; }
html.potech-pattern .potech-header__link.is-active {
  color: var(--potech-blue);
  border-bottom-color: var(--potech-red);
}

/* ==========================================================================
   HERO
   ========================================================================== */

html.potech-pattern .potech-hero {
  position: relative;
  overflow: hidden;
  padding: 96px 40px;
  background: #fff;
  border-bottom: 1px solid var(--rule);
}
html.potech-pattern .potech-hero__bg {
  position: absolute;
  right: -120px;
  bottom: -120px;
  width: 720px;
  opacity: 0.4;
  mix-blend-mode: multiply;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
}
html.potech-pattern .potech-hero__inner {
  max-width: var(--container);
  margin: 0 auto;
  position: relative;
}

/* ---------- THANH NĂNG LỰC ---------- */
html.potech-pattern .potech-capability {
  max-width: var(--container);
  margin: -40px auto 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--potech-blue);
  color: #fff;
  position: relative;
  z-index: 2;
}
html.potech-pattern .potech-capability__cell {
  padding: 28px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
}
html.potech-pattern .potech-capability__cell:last-child { border-right: 0; }
html.potech-pattern .potech-capability__cell::before {
  content: "";
  position: absolute;
  left: 0;
  top: 28px;
  bottom: 28px;
  width: 2px;
  background: var(--potech-red);
}
html.potech-pattern .potech-capability__cell:first-child::before { display: none; }
html.potech-pattern .potech-capability__value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 36px;
  line-height: 1;
}
html.potech-pattern .potech-capability__unit {
  font-size: 14px;
  font-weight: 500;
  opacity: 0.7;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
html.potech-pattern .potech-capability__label {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-on-blue-muted);
  margin-top: 8px;
}

/* ==========================================================================
   SECTION
   ========================================================================== */

html.potech-pattern .potech-section {
  max-width: var(--container);
  margin: 96px auto;
  padding: 0 40px;
}
html.potech-pattern .potech-section__head { margin-bottom: 40px; max-width: 56ch; }
html.potech-pattern .potech-section__head h1,
html.potech-pattern .potech-section__head h2 { margin-top: 12px; }

/* ==========================================================================
   LƯỚI + THẺ SẢN PHẨM
   ========================================================================== */

html.potech-pattern .potech-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
html.potech-pattern .potech-card {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius-2);
  cursor: pointer;
  transition: box-shadow var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out);
  overflow: hidden;
}
html.potech-pattern .potech-card:hover { box-shadow: var(--shadow-3); }
html.potech-pattern .potech-card.is-featured { border-left: 2px solid var(--potech-blue); }
html.potech-pattern .potech-card__image {
  background: var(--ink-050);
  aspect-ratio: 4 / 3;
  display: block;
  width: 100%;
  object-fit: contain;
}
html.potech-pattern .potech-card__body { padding: 18px; }
html.potech-pattern .potech-card__sku {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-subtle);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
html.potech-pattern .potech-card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--ink-900);
  margin: 6px 0 14px;
}
html.potech-pattern .potech-card__title a { color: inherit; border-bottom: 0; }
html.potech-pattern .potech-card:hover .potech-card__title a { color: var(--potech-blue); }
html.potech-pattern .potech-card__specs {
  display: flex;
  flex-wrap: wrap; /* giá trị thuộc tính dài (dải điện áp, tên chip) xuống dòng thay vì tràn */
  gap: 6px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-muted);
  border-top: 1px solid var(--rule);
  padding-top: 12px;
  font-variant-numeric: tabular-nums;
}
/* Tên sản phẩm POTECH thật dài tới 4 dòng, SKU có thể là chuỗi liền không
   khoảng trắng — bẻ được từ thay vì đẩy thẻ rộng ra khỏi lưới. */
html.potech-pattern .potech-card__title,
html.potech-pattern .potech-card__sku {
  overflow-wrap: break-word;
  min-width: 0;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

html.potech-pattern .potech-footer {
  background: var(--bg-deep);
  color: #fff;
  padding: 64px 40px 28px;
  margin-top: 96px;
}
html.potech-pattern .potech-footer__row {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}
/* Trên blue-900 thì cả đỏ tươi (3.33) lẫn -700 đều chìm — dùng bậc sáng -300 (6.31). */
html.potech-pattern .potech-footer__row .caps-label { color: var(--potech-red-300); }
html.potech-pattern .potech-footer a { color: #fff; }
html.potech-pattern .potech-footer a:hover { color: var(--potech-red-300); }
html.potech-pattern .potech-footer__bottom {
  max-width: var(--container);
  margin: 48px auto 0;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  font-size: 12px;
  color: var(--ink-300);
  letter-spacing: 0.04em;
}

/* ==========================================================================
   TRANG SẢN PHẨM
   ========================================================================== */

html.potech-pattern .potech-product {
  max-width: var(--container);
  margin: 40px auto 96px;
  padding: 0 40px;
}
html.potech-pattern .potech-product__crumbs {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: var(--fg-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 32px;
}
html.potech-pattern .potech-product__crumbs a { color: var(--potech-blue); }
html.potech-pattern .potech-product__sep { color: var(--ink-300); }
html.potech-pattern .potech-product__grid {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: 48px;
  align-items: start;
}
html.potech-pattern .potech-product__image {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius-2);
  padding: 24px;
}
html.potech-pattern .potech-product__sku {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-subtle);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
html.potech-pattern .potech-product__pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 24px;
}
html.potech-pattern .pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
html.potech-pattern .pill--blue { background: var(--potech-blue); color: #fff; }
html.potech-pattern .pill--ghost {
  background: var(--potech-blue-050);
  color: var(--potech-blue);
  border: 1px solid var(--potech-blue-100);
}
html.potech-pattern .potech-product__specs { margin-top: 64px; }

/* ==========================================================================
   BẢNG THÔNG SỐ
   ========================================================================== */

html.potech-pattern .potech-spec {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  /* `!important` ở đây là bắt buộc, không phải lười. `public/css/overrides.css`
     của theme có `table { border: #e8e8e8 !important }` — shorthand thiếu
     `<line-width>` và `<line-style>` nên nó reset border-style về `none`, tức
     bảng nào cũng mất viền. Độ đặc hiệu không cứu được: chỉ !important thắng
     được !important. Gỡ dòng đó khỏi overrides.scss thì xoá luôn dòng này. */
  border: 1px solid var(--rule) !important;
  border-radius: var(--radius-2);
  overflow: hidden;
}
html.potech-pattern .potech-spec th {
  background: var(--ink-050);
  text-align: left;
  padding: 12px 18px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
  border-bottom: 1px solid var(--rule);
}
html.potech-pattern .potech-spec td {
  padding: 12px 18px;
  font-size: 14px;
  color: var(--ink-900);
  border-bottom: 1px solid var(--ink-100);
}
html.potech-pattern .potech-spec tr:last-child td { border-bottom: 0; }
html.potech-pattern .potech-spec td.mono { font-family: var(--font-mono); }

/* ==========================================================================
   LIÊN HỆ + FORM BÁO GIÁ
   ========================================================================== */

html.potech-pattern .potech-contact-page {
  max-width: var(--container);
  margin: 64px auto 96px;
  padding: 0 40px;
}
html.potech-pattern .potech-contact-page__grid {
  display: grid;
  grid-template-columns: 7fr 4fr;
  gap: 56px;
  margin-top: 48px;
  align-items: start;
}
html.potech-pattern .potech-contact-page__aside { display: grid; gap: 32px; }
html.potech-pattern .potech-contact-page__hours {
  border-top: 1px solid var(--rule);
  padding-top: 20px;
}

html.potech-pattern .potech-contact-block { display: grid; gap: 16px; }
html.potech-pattern .potech-contact-block__row {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 14px;
  align-items: start;
}
html.potech-pattern .potech-contact-block__prefix {
  font-family: var(--font-text);
  font-weight: 700;
  font-size: 16px;
  /* 16px đậm vẫn chưa là "large text" (mốc 18.66px bold) — cần 4.5, dùng -700. */
  color: var(--potech-red-700);
  letter-spacing: 0.06em;
}
html.potech-pattern .potech-contact-block__label {
  font-family: var(--font-text);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
html.potech-pattern .potech-contact-block__value {
  font-size: 14px;
  color: var(--ink-900);
  margin-top: 2px;
  font-family: var(--font-text);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "zero" 0;
}

html.potech-pattern .potech-rfq { display: grid; gap: 16px; }
html.potech-pattern .potech-rfq__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
html.potech-pattern .potech-rfq label { display: grid; gap: 6px; }
html.potech-pattern .potech-rfq label > span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
/* 16px chứ không phải 15px: iOS Safari tự phóng to trang khi focus vào field
   có chữ dưới 16px — form đang nhập thì layout nhảy. */
html.potech-pattern .potech-rfq input,
html.potech-pattern .potech-rfq select,
html.potech-pattern .potech-rfq textarea {
  font-family: var(--font-text);
  font-size: var(--fs-body);
  color: var(--ink-900);
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-1);
  outline: none;
  background: #fff;
  width: 100%;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
html.potech-pattern .potech-rfq input:focus,
html.potech-pattern .potech-rfq select:focus,
html.potech-pattern .potech-rfq textarea:focus {
  border-color: var(--potech-blue);
  box-shadow: var(--shadow-glow-blue);
}
html.potech-pattern .potech-rfq--sent {
  background: var(--potech-blue-050);
  border: 1px solid var(--potech-blue-100);
  padding: 32px;
  border-radius: var(--radius-2);
}

/* Trạng thái lỗi của field. Markup gắn aria-invalid="true" (đúng chuẩn, máy
   đọc màn hình cũng đọc được) chứ không phải class riêng. Đỏ dùng bậc -700:
   #ED1C24 trên trắng chỉ 4.38, -700 đạt 5.88. */
html.potech-pattern .potech-rfq input[aria-invalid="true"],
html.potech-pattern .potech-rfq select[aria-invalid="true"],
html.potech-pattern .potech-rfq textarea[aria-invalid="true"] {
  border-color: var(--potech-red-700);
}
html.potech-pattern .potech-rfq input[aria-invalid="true"]:focus,
html.potech-pattern .potech-rfq select[aria-invalid="true"]:focus,
html.potech-pattern .potech-rfq textarea[aria-invalid="true"]:focus {
  border-color: var(--potech-red-700);
  box-shadow: var(--shadow-glow-red);
}
html.potech-pattern .potech-rfq__error {
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  color: var(--potech-red-700);
  letter-spacing: 0.02em;
}

/* Nút gửi đang chờ phản hồi — chặn bấm đúp thành hai yêu cầu báo giá. */
html.potech-pattern .btn[disabled],
html.potech-pattern .btn[aria-busy="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

/* ==========================================================================
   ĐÁP ỨNG
   Pattern library viết cho desktop, không có media query nào. Hai mốc dưới đây
   là phần thêm: không có chúng thì lưới 3 cột, 4 ô năng lực và lưới sản phẩm
   5fr/6fr tràn ngang ở khổ hẹp.
   ========================================================================== */

@media (max-width: 1024px) {
  html.potech-pattern .potech-product__grid,
  html.potech-pattern .potech-contact-page__grid { grid-template-columns: 1fr; gap: 32px; }
  html.potech-pattern .potech-grid { grid-template-columns: repeat(2, 1fr); }
  html.potech-pattern .potech-footer__row { grid-template-columns: 1fr 1fr; }
  html.potech-pattern .potech-capability { grid-template-columns: repeat(2, 1fr); }
  html.potech-pattern .potech-capability__cell:nth-child(3)::before { display: none; }
}

/* ==========================================================================
   GIẢM CHUYỂN ĐỘNG
   Không giết mọi transition bằng 0.01ms: đổi màu/viền khi hover vẫn là phản
   hồi hữu ích và không gây chóng mặt. Chỉ tắt thứ CHUYỂN ĐỘNG: cuộn mượt và
   dịch chuyển hình học. Chuyển động của markup theme cũ (dropdown xoay,
   nút bounce) tắt bên theme.css — file này chỉ sở hữu component của nó.
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html.potech-pattern {
    scroll-behavior: auto; /* _global.scss đặt smooth trên html — (0,1,1) thắng (0,0,1) */
  }
  html.potech-pattern .potech-skip {
    transition: none;
  }
}

@media (max-width: 640px) {
  html.potech-pattern .potech-grid { grid-template-columns: 1fr; }
  html.potech-pattern .potech-capability { grid-template-columns: 1fr; margin-top: 0; }
  html.potech-pattern .potech-capability__cell::before { display: none; }
  html.potech-pattern .potech-footer__row { grid-template-columns: 1fr; gap: 28px; }
  html.potech-pattern .potech-footer__bottom { flex-direction: column; gap: 8px; }
  html.potech-pattern .potech-rfq__row { grid-template-columns: 1fr; }
  html.potech-pattern .potech-hero { padding: 56px 20px; }
  html.potech-pattern .potech-hero__bg { width: 420px; right: -80px; bottom: -80px; }
  html.potech-pattern .potech-section,
  html.potech-pattern .potech-product,
  html.potech-pattern .potech-contact-page { padding: 0 20px; margin-top: 56px; margin-bottom: 56px; }
  html.potech-pattern .potech-header { padding: 14px 20px; gap: 16px; }
  html.potech-pattern .potech-header__nav { gap: 16px; overflow-x: auto; }
}

/* Vùng chạm — theo input chứ không theo bề rộng màn hình: laptop cảm ứng cũng
   cần, còn chuột trên cửa sổ hẹp thì không. Đo trên trang thật: .btn đã ≥45px
   (line-height 1.75) nên không đụng; .potech-header__link 34px là thứ duy nhất
   hụt. RFQ input đang 47px, min-height chỉ là sàn giữ cho biến thể sau này. */
@media (pointer: coarse) {
  html.potech-pattern .potech-header__link {
    padding-top: 11px;    /* 11 + 20 (chữ 13px/1.55) + 11 + viền 2 = 44 — áp thử inline ra đúng 44 */
    padding-bottom: 11px;
  }
  html.potech-pattern .potech-rfq input,
  html.potech-pattern .potech-rfq select,
  html.potech-pattern .potech-rfq textarea {
    min-height: 44px;
  }
}

/* Cột đọc cho trang tĩnh chỉ-có-chữ (page.php): container Bootstrap rộng
   1196px ở desktop — 144ch một dòng thì không ai đọc nổi. Cùng công thức
   Read với bài viết đơn (theme.css mục 15): cỡ chữ đọc 18px, cột 72ch tính
   theo 18px ≈ 732px + 24px đệm container, dãn dòng 1.7. .container sẵn
   margin auto nên cột tự vào giữa. */
html.potech-pattern .potech-prose {
  font-size: 18px;
  line-height: 1.7;
  max-width: calc(72ch + 24px);
}

/* PHÁ KHỔ hai bậc. Cột đọc chỉ đúng với CHỮ; nội dung dạng khối thì cột 72ch
   là cái áo chật. Nhận diện theo nội dung (không cần gán template từng trang):

   bậc 1 — 880px: bảng dữ liệu. Phụ trợ cho việc đọc, rộng hơn cột một chút.
   bậc 2 — khổ container: gallery. Trang chứng chỉ chẳng hạn có ĐÚNG 0 ký tự
     chữ, chỉ 40 ảnh xếp 5 cột — nhét vào cột chữ thì mỗi ảnh còn ~140px,
     không đọc nổi con dấu. Lưới ảnh LÀ nội dung chính nên lấy trọn khổ.

   max-width:none vì figure bị max-width 100% kẹp (max-width luôn thắng width).
   Ảnh lẻ KHÔNG phá khổ: trang tĩnh hay chèn ảnh nhỏ giữa dòng.
   Ngưỡng media query = bề rộng tối thiểu để chứa khối + lề, nếu không khối
   sẽ tràn ngang ở khổ hẹp. */
@media (min-width: 960px) {
  html.potech-pattern .potech-prose .wp-block-table,
  html.potech-pattern .potech-prose .wp-block-gallery {
    width: 880px;
    max-width: none;
    margin-left: calc((100% - 880px) / 2);
    margin-right: calc((100% - 880px) / 2);
  }
}
@media (min-width: 1280px) {
  html.potech-pattern .potech-prose .wp-block-gallery {
    /* 1196px = bề rộng nội dung của .container 1220px trừ 12px đệm mỗi bên */
    width: 1196px;
    margin-left: calc((100% - 1196px) / 2);
    margin-right: calc((100% - 1196px) / 2);
  }
}

/* Trạng thái rỗng (404, tìm kiếm không kết quả). Khối cũ mang class Tailwind
   chết nên chưa từng có style — đây là style đầu tiên của nó, không ghi đè ai. */
html.potech-pattern .potech-empty {
  max-width: 72ch;
  padding: 40px 0 72px;
}
html.potech-pattern .potech-empty__msg {
  font-size: var(--fs-h4);
  color: var(--ink-900);
  margin-bottom: 20px;
}
html.potech-pattern .potech-empty__back {
  margin-top: 16px;
}
html.potech-pattern .potech-empty .search-form,
html.potech-pattern .search-form {
  display: flex;
  gap: 8px;
  max-width: 480px;
}
html.potech-pattern .search-form label {
  flex: 1;
  margin: 0;
}
html.potech-pattern .search-form input[type="search"] {
  width: 100%;
  min-height: 44px;
  padding: 8px 14px;
  font-size: var(--fs-body);
  color: var(--fg);
  border: 1px solid var(--ink-300);
  border-radius: var(--radius-1);
  background: var(--paper);
}
html.potech-pattern .search-form input[type="search"]:focus-visible {
  outline: 2px solid var(--potech-blue);
  outline-offset: 1px;
}
html.potech-pattern .search-form button {
  min-height: 44px;
  padding: 8px 22px;
  font-family: var(--font-text);
  font-weight: 600;
  font-size: var(--fs-small);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--paper);
  background-color: var(--potech-red-700);
  border: 1px solid var(--potech-red-700);
  border-radius: var(--radius-1);
  transition: background-color var(--dur-base) var(--ease-out);
}
html.potech-pattern .search-form button:hover {
  background-color: var(--potech-red-800);
  border-color: var(--potech-red-800);
}
