@charset "UTF-8";
/* ==========================================================================
   TMT Design System — foundation (Task 05)
   Mobile-first. Một file: tokens → base → components.
   Quy ước:
   - Biến CSS không tiền tố (--color-*, --space-*...) theo docs/design/design-system.md.
   - Class mới đều bắt đầu bằng .tmt- để không đụng Bootstrap 4.3 / theme cũ (.btn, .card, .badge...).
   - KHÔNG có selector toàn cục (html, body, h1, a...). Typography base chỉ áp trong .tmt-ui.
   - Breakpoint (media query không dùng được var): 430 / 768 / 992 / 1200. Thiết kế gốc 375px.
   Không chứa logic thương mại. Không đụng cart/checkout/biến thể/URL/SEO.
   ========================================================================== */

/* ---------- 1. TOKENS ---------- */
:root {
  /* Màu: thương hiệu (xanh mực in tiền, trầm, đáng tin) */
  --color-brand-900: #12332a;
  --color-brand-800: #1a4235;
  --color-brand-700: #1f4d3f;   /* primary: nút chính, link */
  --color-brand-600: #2b6350;
  --color-brand-500: #3e7c66;
  --color-brand-100: #ddebe5;
  --color-brand-50:  #eef5f1;

  /* Màu: nhấn đồng thau (nhãn, đường kẻ, chi tiết nhỏ; không dùng làm nền lớn) */
  --color-accent-700: #6f5320;
  --color-accent-600: #8f6d2b;
  --color-accent-500: #b08a3e;
  --color-accent-100: #f1e6cc;

  /* Màu: son ấn (giá, giảm giá, cảnh báo; dùng tiết kiệm) */
  --color-seal-700: #8e2620;
  --color-seal-600: #a8322b;
  --color-seal-100: #f6dedb;

  /* Chữ */
  --color-text-strong:  #1f1b16;
  --color-text:         #2e2923;
  --color-text-muted:   #5e5748;
  --color-text-disabled:#8f8777;
  --color-text-inverse: #ffffff;
  --color-text-link:    var(--color-brand-700);

  /* Nền */
  --color-bg-page:    #faf7f2;
  --color-bg-surface: #ffffff;
  --color-bg-subtle:  #f2ede4;
  --color-bg-brand:   var(--color-brand-700);
  --color-bg-inverse: #1f1b16;

  /* Viền, focus */
  --color-border:        #e4dccd;
  --color-border-strong: #cfc4b0;   /* đường kẻ, hover thẻ (trang trí) */
  --color-border-control:#857c6b;   /* viền input/nút/chip: ≥ 3:1 trên nền trắng */
  --color-focus:         #1d4ed8;

  /* Trạng thái (chữ / nền) */
  --color-success: #276a43;  --color-success-bg: #e6f2ea;
  --color-warning: #7a4e00;  --color-warning-bg: #fbefd0;
  --color-error:   #a3231b;  --color-error-bg:   #fbe4e1;
  --color-info:    #1b5496;  --color-info-bg:    #e3eef9;

  /* Font: không tải web font; stack hệ thống hỗ trợ tiếng Việt đủ dấu */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  /* KHÔNG dùng Georgia: dấu xếp chồng tiếng Việt (ầ, ề, ố, ế...) bị lệch. Cambria/Times/Noto Serif đã kiểm tra hiển thị đúng */
  --font-display: Cambria, "Times New Roman", "Noto Serif", serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Cỡ chữ (mobile; override ở media query dưới) */
  --text-display: 32px;  --lh-display: 1.15;
  --text-h1: 28px;       --lh-h1: 1.2;
  --text-h2: 22px;       --lh-h2: 1.25;
  --text-h3: 18px;       --lh-h3: 1.3;
  --text-body: 16px;     --lh-body: 1.6;
  --text-small: 14px;    --lh-small: 1.5;
  --text-caption: 13px;  --lh-caption: 1.4;
  --text-price: 20px;    --lh-price: 1.2;
  --text-button: 16px;
  --text-card-title: 15px;

  /* Khoảng cách: thang 4px, chỉ dùng các bậc này */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;

  /* Bo góc */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 999px;

  /* Bóng (nhẹ, không phô) */
  --shadow-sm: 0 1px 2px rgba(31, 27, 22, 0.06);
  --shadow-md: 0 4px 12px rgba(31, 27, 22, 0.08);
  --shadow-lg: 0 12px 32px rgba(31, 27, 22, 0.12);
  --shadow-focus: 0 0 0 3px rgba(29, 78, 216, 0.35);

  /* Layout */
  --container-max: 1200px;
  --gutter: 16px;
  --header-h: 56px;
  --bottomnav-h: 62px;
  --tap-min: 44px;
  --control-h: 48px;

  /* z-index */
  --z-base: 1;
  --z-sticky: 100;
  --z-bottomnav: 110;
  --z-dropdown: 200;
  --z-drawer: 300;
  --z-modal: 400;
  --z-toast: 500;

  /* Chuyển động ngắn, không phô trương */
  --duration-fast: 120ms;
  --duration-base: 200ms;
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

/* Tablet ≥ 768 */
@media (min-width: 768px) {
  :root {
    --text-display: 40px;
    --text-h1: 32px;
    --text-h2: 26px;
    --text-h3: 20px;
    --text-price: 22px;
    --text-card-title: 16px;
    --gutter: 24px;
    --header-h: 64px;
  }
}

/* Desktop ≥ 992 */
@media (min-width: 992px) {
  :root {
    --text-display: 52px;
    --text-h1: 40px;
    --text-h2: 32px;
    --text-h3: 24px;
    --text-body: 17px;
    --text-small: 15px;
    --text-price: 24px;
    --gutter: 32px;
    --header-h: 72px;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root { --duration-fast: 0ms; --duration-base: 0ms; }
}

/* ---------- 2. BASE (chỉ trong .tmt-ui) ---------- */
.tmt-ui {
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: var(--lh-body);
  color: var(--color-text);
  background: var(--color-bg-page);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
.tmt-ui *, .tmt-ui *::before, .tmt-ui *::after { box-sizing: border-box; }
/* Chỉ thẻ chưa có class: component (.tmt-header__logo, .tmt-nav__link...) tự định nghĩa và không bị luật base đè */
.tmt-ui img:not([class]) { max-width: 100%; height: auto; display: block; }
.tmt-ui a:not([class]) { color: var(--color-text-link); }

/* Base cho heading/đoạn văn CHƯA có class. Thẻ có class (vd .tmt-card__title) do component tự định nghĩa,
   tránh bị luật base đè (đã gặp lỗi h3.tmt-card__title bị đổi font/cỡ chữ). */
.tmt-ui h1, .tmt-ui h2, .tmt-ui h3, .tmt-ui h4 { margin: 0; color: var(--color-text-strong); overflow-wrap: break-word; }
.tmt-ui h1:not([class]), .tmt-ui h2:not([class]), .tmt-ui h3:not([class]) {
  margin-bottom: var(--space-3); font-family: var(--font-display); font-weight: 700; letter-spacing: -0.005em;
}
.tmt-ui h4:not([class]) { margin-bottom: var(--space-3); font-family: var(--font-sans); font-weight: 700; font-size: var(--text-body); line-height: var(--lh-body); }
.tmt-ui h1:not([class]) { font-size: var(--text-h1); line-height: var(--lh-h1); }
.tmt-ui h2:not([class]) { font-size: var(--text-h2); line-height: var(--lh-h2); }
.tmt-ui h3:not([class]) { font-size: var(--text-h3); line-height: var(--lh-h3); }
.tmt-ui p:not([class]) { margin: 0 0 var(--space-4); }

/* Lớp typography dùng được ngoài thẻ heading */
.tmt-display { font-family: var(--font-display); font-weight: 700; font-size: var(--text-display); line-height: var(--lh-display); letter-spacing: -0.01em; color: var(--color-text-strong); }
.tmt-h1 { font-family: var(--font-display); font-weight: 700; font-size: var(--text-h1); line-height: var(--lh-h1); color: var(--color-text-strong); }
.tmt-h2 { font-family: var(--font-display); font-weight: 700; font-size: var(--text-h2); line-height: var(--lh-h2); color: var(--color-text-strong); }
.tmt-h3 { font-family: var(--font-display); font-weight: 700; font-size: var(--text-h3); line-height: var(--lh-h3); color: var(--color-text-strong); }
.tmt-body { font-size: var(--text-body); line-height: var(--lh-body); }
.tmt-small { font-size: var(--text-small); line-height: var(--lh-small); }
.tmt-caption { font-size: var(--text-caption); line-height: var(--lh-caption); color: var(--color-text-muted); }
.tmt-muted { color: var(--color-text-muted); }
.tmt-kicker { font-size: var(--text-caption); line-height: var(--lh-caption); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-accent-700); }
.tmt-price { font-size: var(--text-price); line-height: var(--lh-price); font-weight: 700; color: var(--color-seal-700); font-variant-numeric: tabular-nums; }
.tmt-price__old { font-size: var(--text-small); font-weight: 400; color: var(--color-text-muted); text-decoration: line-through; margin-left: var(--space-2); }

/* ---------- 3. LAYOUT ---------- */
.tmt-container { width: 100%; max-width: calc(var(--container-max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.tmt-section { padding-block: var(--space-8); }
@media (min-width: 768px) { .tmt-section { padding-block: var(--space-12); } }
@media (min-width: 992px) { .tmt-section { padding-block: var(--space-16); } }
.tmt-stack > * + * { margin-top: var(--space-4); }
.tmt-stack--sm > * + * { margin-top: var(--space-2); }
.tmt-stack--lg > * + * { margin-top: var(--space-6); }
.tmt-cluster { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }

/* Lưới sản phẩm: 2 cột mobile, 3 tablet, 4 desktop */
.tmt-grid { display: grid; gap: var(--space-3); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) { .tmt-grid { gap: var(--space-4); grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 992px) { .tmt-grid { gap: var(--space-6); grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tmt-grid--stories { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) { .tmt-grid--stories { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 992px) { .tmt-grid--stories { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.tmt-visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.tmt-skip-link { position: absolute; left: var(--space-2); top: -100px; z-index: var(--z-toast); background: var(--color-bg-inverse); color: var(--color-text-inverse); padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); }
.tmt-skip-link:focus { top: var(--space-2); }

/* ---------- 4. FOCUS (toàn bộ thành phần tương tác) ---------- */
.tmt-btn:focus-visible, .tmt-link:focus-visible, .tmt-iconbtn:focus-visible, .tmt-chip:focus-visible,
.tmt-input:focus-visible, .tmt-select:focus-visible, .tmt-qty__btn:focus-visible, .tmt-qty__input:focus-visible,
.tmt-bottomnav__item:focus-visible, .tmt-lang__btn:focus-visible, .tmt-pagination a:focus-visible,
.tmt-accordion summary:focus-visible, .tmt-card a:focus-visible, .tmt-breadcrumb a:focus-visible,
.tmt-check input:focus-visible + .tmt-check__box, .tmt-radio input:focus-visible + .tmt-radio__box {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

/* ---------- 5. BUTTONS ---------- */
.tmt-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: var(--control-h); min-width: var(--tap-min);
  padding: var(--space-3) var(--space-6);
  font: 600 var(--text-button)/1.2 var(--font-sans);
  text-decoration: none; text-align: center; cursor: pointer;
  border: 1.5px solid transparent; border-radius: var(--radius-md);
  transition: background-color var(--duration-fast) var(--ease), border-color var(--duration-fast) var(--ease), color var(--duration-fast) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.tmt-btn--primary { background: var(--color-brand-700); color: var(--color-text-inverse); border-color: var(--color-brand-700); }
.tmt-btn--primary:hover { background: var(--color-brand-800); border-color: var(--color-brand-800); }
.tmt-btn--primary:active { background: var(--color-brand-900); border-color: var(--color-brand-900); }
.tmt-btn--secondary { background: var(--color-bg-surface); color: var(--color-brand-700); border-color: var(--color-brand-700); }
.tmt-btn--secondary:hover { background: var(--color-brand-50); }
.tmt-btn--secondary:active { background: var(--color-brand-100); }
.tmt-btn--ghost { background: transparent; color: var(--color-text-strong); border-color: var(--color-border-control); }
.tmt-btn--ghost:hover { background: var(--color-bg-subtle); }
.tmt-btn--ghost:active { background: var(--color-border); }
.tmt-btn--sm { min-height: var(--tap-min); padding: var(--space-2) var(--space-4); font-size: var(--text-small); }
.tmt-btn--block { display: flex; width: 100%; }
.tmt-btn[disabled], .tmt-btn.is-disabled, .tmt-btn[aria-disabled="true"] {
  background: var(--color-bg-subtle); color: var(--color-text-disabled); border-color: var(--color-border);
  cursor: not-allowed; pointer-events: none;
}
/* Link chữ: luôn gạch chân để phân biệt với chữ thường */
.tmt-link { color: var(--color-text-link); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.tmt-link:hover { color: var(--color-brand-900); }
/* Link đứng riêng (không nằm trong câu) phải có vùng chạm ≥ 44px; link nằm trong câu được miễn */
.tmt-link--arrow { display: inline-flex; align-items: center; min-height: var(--tap-min); }
.tmt-link--arrow::after { content: "\00a0→"; text-decoration: none; display: inline-block; }

/* Nút icon (hamburger, tìm, giỏ): vùng chạm ≥ 44px */
.tmt-iconbtn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 var(--tap-min); width: var(--tap-min); height: var(--tap-min); padding: 0;
  background: transparent; color: var(--color-text-strong); border: 0; border-radius: var(--radius-md); cursor: pointer;
}
.tmt-iconbtn:hover { background: var(--color-bg-subtle); }
.tmt-iconbtn svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.tmt-iconbtn__count {
  position: absolute; top: 2px; right: 0; min-width: 20px; height: 20px; padding: 0 5px;
  font: 700 13px/20px var(--font-sans); text-align: center; color: var(--color-text-inverse);
  background: var(--color-seal-600); border-radius: var(--radius-pill);
}

/* ---------- 6. BADGE / CHIP ---------- */
.tmt-badge {
  display: inline-block; padding: 2px var(--space-2); font: 700 var(--text-caption)/1.4 var(--font-sans);
  border-radius: var(--radius-sm); background: var(--color-bg-subtle); color: var(--color-text-strong); border: 1px solid var(--color-border);
}
.tmt-badge--new  { background: var(--color-brand-50); color: var(--color-brand-800); border-color: var(--color-brand-100); }
.tmt-badge--sale { background: var(--color-seal-100); color: var(--color-seal-700); border-color: var(--color-seal-100); }
.tmt-badge--gift { background: var(--color-accent-100); color: var(--color-accent-700); border-color: var(--color-accent-100); }
.tmt-badge--out  { background: var(--color-bg-subtle); color: var(--color-text-muted); }

.tmt-chip {
  display: inline-flex; align-items: center; min-height: var(--tap-min); padding: var(--space-2) var(--space-4);
  font: 500 var(--text-small)/1.2 var(--font-sans); color: var(--color-text-strong); text-decoration: none; cursor: pointer;
  background: var(--color-bg-surface); border: 1.5px solid var(--color-border-control); border-radius: var(--radius-pill);
}
.tmt-chip:hover { background: var(--color-bg-subtle); }
.tmt-chip[aria-pressed="true"], .tmt-chip.is-active { background: var(--color-brand-700); border-color: var(--color-brand-700); color: var(--color-text-inverse); }
.tmt-chips { display: flex; gap: var(--space-2); overflow-x: auto; padding-bottom: var(--space-1); scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.tmt-chips > * { flex: 0 0 auto; }

/* ---------- 7. CARDS ---------- */
.tmt-card { position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--color-bg-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; }
.tmt-card--hover { transition: box-shadow var(--duration-base) var(--ease), border-color var(--duration-base) var(--ease); }
.tmt-card--hover:hover { box-shadow: var(--shadow-md); border-color: var(--color-border-strong); }
.tmt-card__media { position: relative; background: var(--color-bg-subtle); aspect-ratio: 4 / 3; }
.tmt-card__media img { width: 100%; height: 100%; object-fit: contain; }
.tmt-card__body { display: flex; flex-direction: column; flex: 1; gap: var(--space-2); padding: var(--space-3); }
.tmt-card__flags { position: absolute; top: var(--space-2); left: var(--space-2); display: flex; gap: var(--space-1); }
.tmt-card__title { margin: 0; font: 600 var(--text-card-title)/1.35 var(--font-sans); color: var(--color-text-strong); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tmt-card .tmt-card__title a { position: static; color: inherit; text-decoration: none; } /* position:static: theme cũ có a{position:relative} làm lớp phủ ::after chỉ phủ đúng dòng chữ */
/* Cả thẻ bấm được qua link tiêu đề (mở rộng vùng chạm, không cần JS) */
.tmt-card__title a::after { content: ""; position: absolute; inset: 0; }
.tmt-card__meta { margin: 0; font-size: var(--text-caption); line-height: var(--lh-caption); color: var(--color-text-muted); }
.tmt-card__foot { margin-top: auto; display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--space-1) var(--space-2); }

/* Product card */
.tmt-product-card .tmt-card__body { padding: var(--space-3); }
/* Task 46: khung ảnh thẻ sản phẩm CỐ ĐỊNH 1:1, ảnh nằm tuyệt đối bên trong và co vừa khung (contain, căn giữa).
   Trước đây ảnh có height:100% trong khung chỉ có aspect-ratio (chiều cao auto) nên khung bị ảnh kéo cao/thấp theo từng ảnh và ảnh dính mép trên (thẻ lệch chiều cao, dải trống phía dưới ảnh ngang; trình duyệt xử lý % chiều cao khác nhau nên có máy thấy ảnh méo/cắt).
   Không cắt (không cover), không kéo giãn. ~91% ảnh catalog gần vuông (0.9-1.1), ~6% là tiền ngang 2:1: các ảnh này thấy ĐỦ ảnh, đúng tỉ lệ, nằm giữa khung. */
.tmt-product-card .tmt-card__media { aspect-ratio: 1 / 1; overflow: hidden; background: var(--color-bg-subtle); }
.tmt-product-card .tmt-card__media img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: none; box-sizing: border-box; object-fit: contain; object-position: 50% 50%; }
/* Task 27: CTA trên thẻ. z-index để nằm trên lớp phủ ::after của link tiêu đề (thẻ cả ô là link). Nút >= 44px (tap-min). */
.tmt-card__cta { position: relative; z-index: 2; margin-top: var(--space-1); }
.tmt-card__form { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); margin: 0; }
.tmt-card__btn { min-width: 0; min-height: var(--tap-min); padding: var(--space-1) var(--space-1); font-size: var(--text-small); line-height: 1.15; white-space: nowrap; text-align: center; justify-content: center; }
.tmt-card__btn--wide { display: flex; width: 100%; }
@media (max-width: 429.98px) { .tmt-card__btn { font-size: 13px; padding-inline: 2px; } .tmt-card__form { gap: 6px; } }
@media (max-width: 359.98px) { .tmt-card__form { grid-template-columns: 1fr; } }
@media (min-width: 992px) { .tmt-card__btn { padding-inline: var(--space-3); } }

/* Collection card: ảnh + tên + số lượng */
.tmt-collection-card .tmt-card__media { aspect-ratio: 16 / 10; }
.tmt-collection-card .tmt-card__body { flex-direction: row; align-items: center; justify-content: space-between; }
.tmt-collection-card .tmt-card__title { font-family: var(--font-display); font-size: var(--text-h3); -webkit-line-clamp: 2; }

/* Story card: câu chuyện / bài viết */
.tmt-story-card .tmt-card__media { aspect-ratio: 16 / 10; }
.tmt-story-card .tmt-card__title { font-family: var(--font-display); font-size: var(--text-h3); line-height: 1.3; -webkit-line-clamp: 3; }
.tmt-story-card__excerpt { margin: 0; font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Gift card: nền kem + vạch đồng thau để phân biệt nhóm quà tặng */
.tmt-gift-card { background: var(--color-bg-subtle); border-color: var(--color-accent-100); border-top: 3px solid var(--color-accent-600); }
.tmt-gift-card .tmt-card__media { background: var(--color-accent-100); }
.tmt-gift-card .tmt-card__foot { padding-top: var(--space-2); border-top: 1px dashed var(--color-border-strong); }

/* ---------- 8. FORMS ---------- */
.tmt-field { display: flex; flex-direction: column; gap: var(--space-2); }
.tmt-label { font-size: var(--text-small); font-weight: 600; color: var(--color-text-strong); }
.tmt-hint { margin: 0; font-size: var(--text-caption); color: var(--color-text-muted); }
.tmt-error-text { margin: 0; font-size: var(--text-caption); font-weight: 600; color: var(--color-error); }
.tmt-input, .tmt-select {
  width: 100%; min-height: var(--control-h); padding: var(--space-3) var(--space-4);
  font: 400 16px/1.4 var(--font-sans); /* 16px: iOS không tự phóng to khi focus */
  color: var(--color-text-strong); background: var(--color-bg-surface);
  border: 1.5px solid var(--color-border-control); border-radius: var(--radius-md);
  transition: border-color var(--duration-fast) var(--ease), box-shadow var(--duration-fast) var(--ease);
}
.tmt-input::placeholder { color: var(--color-text-muted); opacity: 1; }
.tmt-input:hover, .tmt-select:hover { border-color: var(--color-text-strong); }
.tmt-input:focus, .tmt-select:focus { outline: none; border-color: var(--color-focus); box-shadow: var(--shadow-focus); }
.tmt-input[aria-invalid="true"], .tmt-input.is-invalid { border-color: var(--color-error); }
.tmt-input:disabled, .tmt-select:disabled { background: var(--color-bg-subtle); color: var(--color-text-disabled); cursor: not-allowed; }
.tmt-select { appearance: none; -webkit-appearance: none; padding-right: var(--space-8);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%232e2923' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right var(--space-3) center; }

/* Ô tìm kiếm: input + nút liền khối */
.tmt-search { display: flex; width: 100%; }
.tmt-search .tmt-input { border-right: 0; border-radius: var(--radius-md) 0 0 var(--radius-md); }
.tmt-search .tmt-btn { border-radius: 0 var(--radius-md) var(--radius-md) 0; padding-inline: var(--space-4); }

/* Số lượng */
.tmt-qty { display: inline-flex; align-items: stretch; border: 1.5px solid var(--color-border-control); border-radius: var(--radius-md); background: var(--color-bg-surface); overflow: hidden; }
.tmt-qty__btn { width: var(--tap-min); min-height: var(--control-h); font: 600 20px/1 var(--font-sans); color: var(--color-text-strong); background: transparent; border: 0; cursor: pointer; }
.tmt-qty__btn:hover { background: var(--color-bg-subtle); }
.tmt-qty__btn[disabled] { color: var(--color-text-disabled); cursor: not-allowed; }
.tmt-qty__input { width: 52px; text-align: center; font: 600 16px/1 var(--font-sans); color: var(--color-text-strong); border: 0; border-inline: 1px solid var(--color-border); background: transparent; -moz-appearance: textfield; }
.tmt-qty__input::-webkit-outer-spin-button, .tmt-qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Checkbox / radio: input gốc (a11y đầy đủ) + hộp vẽ lại; vùng chạm = cả hàng ≥ 44px */
.tmt-check, .tmt-radio { position: relative; display: flex; align-items: center; gap: var(--space-3); min-height: var(--tap-min); cursor: pointer; font-size: var(--text-body); color: var(--color-text); }
.tmt-check input, .tmt-radio input { position: absolute; opacity: 0; width: 24px; height: 24px; margin: 0; }
.tmt-check__box, .tmt-radio__box { flex: 0 0 24px; width: 24px; height: 24px; background: var(--color-bg-surface); border: 1.5px solid var(--color-border-control); }
.tmt-check__box { border-radius: var(--radius-sm); }
.tmt-radio__box { border-radius: 50%; }
.tmt-check input:checked + .tmt-check__box { background: var(--color-brand-700); border-color: var(--color-brand-700);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); background-size: 80%; background-position: center; background-repeat: no-repeat; }
.tmt-radio input:checked + .tmt-radio__box { border-color: var(--color-brand-700); border-width: 7px; }
.tmt-check input:disabled + .tmt-check__box, .tmt-radio input:disabled + .tmt-radio__box { background: var(--color-bg-subtle); border-color: var(--color-border); }

/* ---------- 9. BREADCRUMB / ACCORDION / PAGINATION / NOTICE / EMPTY ---------- */
.tmt-breadcrumb ol { display: flex; flex-wrap: wrap; gap: 0 var(--space-2); align-items: center; margin: 0; padding: 0; list-style: none; font-size: var(--text-small); color: var(--color-text-muted); }
.tmt-breadcrumb li { display: inline-flex; align-items: center; }
.tmt-breadcrumb li + li::before { content: "/"; margin-right: var(--space-2); color: var(--color-border-strong); }
.tmt-breadcrumb a { display: inline-flex; align-items: center; min-height: var(--tap-min); color: var(--color-text-link); }
.tmt-breadcrumb [aria-current="page"] { color: var(--color-text-strong); font-weight: 600; }

.tmt-accordion { border-top: 1px solid var(--color-border); }
.tmt-accordion details { border-bottom: 1px solid var(--color-border); }
.tmt-accordion summary { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: var(--tap-min); padding: var(--space-3) 0; font-weight: 600; color: var(--color-text-strong); cursor: pointer; list-style: none; }
.tmt-accordion summary::-webkit-details-marker { display: none; }
.tmt-accordion summary::after { content: "+"; flex: 0 0 auto; font: 400 24px/1 var(--font-sans); color: var(--color-brand-700); }
.tmt-accordion details[open] summary::after { content: "−"; }
.tmt-accordion__panel { padding: 0 0 var(--space-4); color: var(--color-text); }

.tmt-pagination { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0; padding: 0; list-style: none; justify-content: center; }
.tmt-pagination a, .tmt-pagination span, .tmt-ui .tmt-pagination a { display: inline-flex; align-items: center; justify-content: center; min-width: var(--tap-min); min-height: var(--tap-min); padding: 0 var(--space-3); font-weight: 600; text-decoration: none; color: var(--color-text-strong); background: var(--color-bg-surface); border: 1.5px solid var(--color-border-control); border-radius: var(--radius-md); }
.tmt-pagination a:hover { background: var(--color-bg-subtle); }
.tmt-ui .tmt-pagination a { color: var(--color-text-strong); }
.tmt-ui .tmt-pagination [aria-current="page"] { color: var(--color-text-inverse); }
.tmt-pagination [aria-current="page"] { background: var(--color-brand-700); border-color: var(--color-brand-700); color: var(--color-text-inverse); }
.tmt-pagination .is-disabled { color: var(--color-text-disabled); background: var(--color-bg-subtle); border-color: var(--color-border); }
/* Chữ "Trước"/"Sau" nằm trong span lồng bên trong nút: không được ăn luật khung của .tmt-pagination span (lỗi viền kép, sửa ở Task 12) */
.tmt-pagination .tmt-pagination__word { display: inline; min-width: 0; min-height: 0; padding: 0; font: inherit; color: inherit; background: none; border: 0; border-radius: 0; }

.tmt-notice { display: flex; gap: var(--space-3); padding: var(--space-3) var(--space-4); font-size: var(--text-small); line-height: var(--lh-small); border-left: 4px solid currentColor; border-radius: var(--radius-sm); }
.tmt-notice > * { margin: 0; }
.tmt-notice--info    { color: var(--color-info);    background: var(--color-info-bg); }
.tmt-notice--success { color: var(--color-success); background: var(--color-success-bg); }
.tmt-notice--warning { color: var(--color-warning); background: var(--color-warning-bg); }
.tmt-notice--error   { color: var(--color-error);   background: var(--color-error-bg); }
.tmt-notice__text { color: var(--color-text-strong); }

.tmt-empty { text-align: center; padding: var(--space-12) var(--space-4); background: var(--color-bg-surface); border: 1px dashed var(--color-border-strong); border-radius: var(--radius-lg); }
.tmt-empty__title { margin: 0 0 var(--space-2); font: 700 var(--text-h3)/var(--lh-h3) var(--font-display); color: var(--color-text-strong); }
.tmt-empty p { margin: 0 auto var(--space-6); max-width: 36ch; color: var(--color-text-muted); }

/* ---------- 10. NAVIGATION FOUNDATION (chỉ giao diện, chưa gắn hành vi) ---------- */
.tmt-header { position: sticky; top: 0; z-index: var(--z-sticky); background: var(--color-bg-surface); border-bottom: 1px solid var(--color-border); }
.tmt-header__bar { display: flex; align-items: center; gap: var(--space-1); min-height: var(--header-h); padding-inline: var(--space-2); max-width: calc(var(--container-max) + 2 * var(--gutter)); margin-inline: auto; }
.tmt-header__brand { flex: 1 1 auto; min-width: 0; min-height: var(--tap-min); display: flex; align-items: center; justify-content: flex-start; padding-inline: var(--space-2); font: 700 18px/1.1 var(--font-display); color: var(--color-brand-800); text-decoration: none; letter-spacing: 0.02em; }
.tmt-header__brand small { display: none; font: 600 13px/1.2 var(--font-sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-accent-700); }
@media (min-width: 430px) { .tmt-header__brand small { display: block; } }
.tmt-header__actions { display: flex; align-items: center; flex: 0 0 auto; }
.tmt-header__search { padding: 0 var(--space-4) var(--space-3); }
.tmt-header__search[hidden] { display: none; }

/* Chuyển ngôn ngữ VI | EN */
.tmt-lang { display: inline-flex; margin-inline: var(--space-1); border: 1.5px solid var(--color-border-control); border-radius: var(--radius-pill); }
/* Nút nhìn cao 36px; vùng chạm mở rộng lên 44px bằng ::after (không đổi kích thước nhìn thấy) */
.tmt-lang__btn { position: relative; min-width: var(--tap-min); min-height: 36px; padding: 0 var(--space-2); display: inline-flex; align-items: center; justify-content: center; font: 700 var(--text-caption)/1 var(--font-sans); color: var(--color-text-strong); background: transparent; border: 0; border-radius: var(--radius-pill); cursor: pointer; text-decoration: none; }
.tmt-lang__btn::after { content: ""; position: absolute; inset: -4px 0; }
.tmt-lang__btn[aria-current="true"] { background: var(--color-brand-700); color: var(--color-text-inverse); }

/* Thanh điều hướng dưới (chỉ mobile/tablet): 5 mục, mỗi mục ≥ 44px */
.tmt-bottomnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-bottomnav); display: grid; grid-template-columns: repeat(5, 1fr); background: var(--color-bg-surface); border-top: 1px solid var(--color-border); box-shadow: 0 -2px 8px rgba(31, 27, 22, 0.06); padding-bottom: env(safe-area-inset-bottom); }
.tmt-bottomnav__item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: var(--bottomnav-h); padding: var(--space-2) 2px; font: 600 13px/1.15 var(--font-sans); color: var(--color-text-muted); text-decoration: none; text-align: center; background: transparent; border: 0; cursor: pointer; }
.tmt-bottomnav__item svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.tmt-bottomnav__item[aria-current="page"] { color: var(--color-brand-700); box-shadow: inset 0 3px 0 var(--color-brand-700); }
/* Chừa chỗ cho thanh dưới khi trang bật nó */
.tmt-has-bottomnav { padding-bottom: calc(var(--bottomnav-h) + env(safe-area-inset-bottom)); }
@media (min-width: 992px) {
  .tmt-bottomnav { display: none; }
  .tmt-has-bottomnav { padding-bottom: 0; }
  .tmt-header__brand { font-size: 22px; }
}
/* Task 32: nhãn thanh dưới không xuống dòng (ở 360px "Câu chuyện" xuống 2 dòng làm thanh cao 73px > --bottomnav-h 61px nên thanh mua dính đè lên thanh dưới). Cỡ chữ co theo chiều rộng, tối thiểu 10,5px. */
.tmt-bottomnav__item span { white-space: nowrap; font-size: clamp(10.5px, 3.45vw, 13px); letter-spacing: 0; }
.tmt-bottomnav__item { padding-inline: 1px; min-width: 0; }