/* ==========================================================
   Xe Máy Tuấn Đạt — phần dùng chung khi chạy trên WordPress
   (thanh quản trị, mô tả danh mục, nội dung bài viết, WooCommerce)
   ========================================================== */

/* Ảnh WebP: <picture> không tạo khung riêng, ảnh bên trong giữ nguyên kiểu như cũ */
picture.td-pic { display: contents; }

/* Dòng "Góp ~…/th" dưới giá ở mọi thẻ xe (trang chủ, xe nổi bật, xe tương tự, tìm kiếm) */
.td-inst { display: block; margin-top: 5px; font-family: var(--sans); font-size: 12.5px; font-weight: 400; font-style: normal;
  letter-spacing: 0; text-transform: none; line-height: 1.35; color: #6B675F; }
.pd-card .td-inst { margin-top: 0; color: #B5AFA3; }
.td-results .pd-card .td-inst { color: #B5AFA3; }
@media (max-width: 560px) { .td-inst { font-size: 11.5px; } }

/* ---------- Cân chỉnh điện thoại: chữ tối thiểu ~11px, vùng chạm ≥ 40px ---------- */
@media (max-width: 760px) {
  .br-card__body small { font-size: 11px; letter-spacing: .06em; }
  .br-stats dt, .coll-hero__stats dt { font-size: 11px; }
  .tile__model { font-size: 10.5px; }
  .cat__count { font-size: 11px; }
  .cat__from { font-size: 11.5px; }
  .tt-cat { font-size: 10.5px; }
  .visit__txt small, .site-foot .sf-hot small { font-size: 11px; }
  .sh-drawer__cat small { font-size: 11px; }
  /* nút / link quá nhỏ để chạm */
  .car__ask { width: 40px; height: 40px; }
  .car__ask svg { width: 20px; height: 20px; }
  .sh-drawer__all { display: inline-flex; align-items: center; min-height: 40px; }
  .br-group h3 a { display: inline-flex; align-items: center; min-height: 40px; }
  .site-foot .sf-info a { display: inline-flex; align-items: center; min-height: 36px; }
  .pd-related__head a, .tt-upd, .ab-svc__more { display: inline-flex; align-items: center; min-height: 40px; }
}

/* Thanh quản trị WordPress (chỉ người đăng nhập thấy) */
body.admin-bar :root .sh-header, body.admin-bar .sh-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .sh-header { top: 46px; } }
@media (max-width: 600px) { body.admin-bar .sh-header { top: 0; } #wpadminbar { position: absolute; } }

/* ---------- Nội dung soạn trong WordPress (mô tả danh mục, bài viết, trang) ---------- */
.td-prose { font-size: 16.5px; line-height: 1.85; color: #3E3B35; overflow-wrap: anywhere; }
.td-prose > :first-child { margin-top: 0; }
.td-prose h2 { margin: 1.9em 0 .6em; font-family: var(--serif); font-size: clamp(23px, 2.2vw, 30px); font-weight: 800; line-height: 1.25; color: #1C1E22; letter-spacing: -.005em; }
.td-prose h3 { margin: 1.6em 0 .5em; font-family: var(--serif); font-size: clamp(19px, 1.7vw, 22px); font-weight: 700; line-height: 1.3; color: #1C1E22; }
.td-prose h4 { margin: 1.4em 0 .4em; font-family: var(--serif); font-size: 17px; font-weight: 700; color: #1C1E22; }
.td-prose p { margin: 0 0 1em; color: #3E3B35 !important; }
.td-prose a { color: #8C6A22; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(169,129,47,.45); }
.td-prose a:hover { color: #1C1E22; }
.td-prose strong, .td-prose b { color: #1C1E22; font-weight: 600; }
.td-prose ul, .td-prose ol { margin: 0 0 1.1em; padding-left: 1.3em; }
.td-prose li { margin-bottom: .45em; }
.td-prose li::marker { color: #A9812F; }
.td-prose blockquote { margin: 1.4em 0; padding: 16px 20px; border-left: 3px solid #C8A04A; background: #F7F3EA; border-radius: 0 12px 12px 0; color: #2A2D33; }
.td-prose blockquote p:last-child { margin: 0; }
.td-prose img { border-radius: 14px; height: auto; }
.td-prose figure { margin: 1.6em 0; max-width: 100%; }
.td-prose figcaption, .td-prose .wp-caption-text { margin-top: 8px; font-size: 13px; color: #8A857B; text-align: center; }
.td-prose .wp-caption { max-width: 100%; }
.td-prose .aligncenter { margin-left: auto; margin-right: auto; }
.td-prose .alignleft { float: left; margin: .3em 1.4em 1em 0; }
.td-prose .alignright { float: right; margin: .3em 0 1em 1.4em; }
.td-prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: 15px; background: #fff; }
.td-prose th, .td-prose td { padding: 10px 12px; border: 1px solid #E6E3DC; text-align: left; vertical-align: top; }
.td-prose th, .td-prose tr:first-child td { background: #F7F3EA; color: #1C1E22; font-weight: 600; }
.td-prose iframe, .td-prose video { max-width: 100%; border-radius: 14px; }
.td-prose hr { border: 0; height: 1px; background: #E6E3DC; margin: 2em 0; }
.td-prose::after { content: ""; display: table; clear: both; }
@media (max-width: 600px) {
  .td-prose { font-size: 16px; line-height: 1.8; }
  .td-prose .alignleft, .td-prose .alignright { float: none; margin: 1em auto; }
  .td-prose table { display: block; overflow-x: auto; white-space: nowrap; }
}

/* Mục lục (Easy Table of Contents) */
.td-prose #ez-toc-container, .td-prose .ez-toc-v2_0_74 { width: 100% !important; margin: 0 0 1.6em; padding: 16px 18px; border: 1px solid #E6E3DC; border-radius: 16px; background: #fff; box-shadow: none; }
.td-prose #ez-toc-container .ez-toc-title { font-family: var(--serif); font-size: 15px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #1C1E22; }
.td-prose #ez-toc-container ul { margin: 10px 0 0; padding-left: 0; }
.td-prose #ez-toc-container li { margin: 0; padding: 4px 0; list-style: none; }
.td-prose #ez-toc-container a { color: #3E3B35; text-decoration: none; font-size: 15px; }
.td-prose #ez-toc-container a:hover { color: #A9812F; }

/* nội dung soạn sẵn có ảnh / bảng rộng cố định: không được làm vỡ khung trên điện thoại */
.br-about__grid > *, .pd-desc-grid > *, .ps-grid > * { min-width: 0; }
.td-prose img, .td-prose figure, .td-prose .wp-caption, .td-prose video { max-width: 100% !important; height: auto; }

/* ---------- Mô tả danh mục (nội dung SEO cũ của từng danh mục) ---------- */
.td-desc { margin-top: 26px; padding-top: 22px; border-top: 1px solid #E6E3DC; }
.td-desc .td-prose { font-size: 15.5px; }
.td-desc.is-clamped .td-prose { max-height: 360px; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent); mask-image: linear-gradient(180deg, #000 60%, transparent); }
.td-desc__more { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; padding: 10px 18px; border: 1px solid #C8A04A; border-radius: 999px;
  font-family: var(--serif); font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8C6A22; background: #fff; }
.td-desc__more svg { width: 16px; height: 16px; transition: transform .3s; }
.td-desc:not(.is-clamped) .td-desc__more svg { transform: rotate(180deg); }
.td-desc__more[hidden] { display: none; }

/* ---------- Lối tắt (404, không có kết quả) ---------- */
.td-quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.td-quick a { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 14px; padding: 10px 16px 10px 10px; border: 1px solid #E6E3DC; border-radius: 16px; background: #fff;
  text-decoration: none !important; color: #1C1E22 !important; transition: border-color .3s, box-shadow .3s; }
.td-quick a:hover { border-color: #C8A04A; box-shadow: 0 16px 30px -22px rgba(28,30,34,.4); }
.td-quick img { width: 64px; height: 64px; object-fit: cover; border-radius: 12px; }
.td-quick b { font-family: var(--serif); font-size: 17px; }
.td-quick svg { width: 18px; height: 18px; color: #A9812F; }
@media (max-width: 760px) { .td-quick { grid-template-columns: 1fr; } }

.td-results { margin-top: 6px; }
.td-pager { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 28px; }
.td-pager .page-numbers { min-width: 42px; height: 42px; display: grid; place-items: center; padding: 0 12px; border: 1px solid #E6E3DC; border-radius: 999px; background: #fff;
  font-family: var(--serif); font-weight: 700; color: #1C1E22; text-decoration: none !important; }
.td-pager .current { background: #1C1E22; color: #F3EEE4; border-color: #1C1E22; }

/* ---------- WooCommerce: giỏ hàng / thanh toán / tài khoản ---------- */
.td-woo .button, .td-woo button.button, .td-woo input.button, .td-woo #place_order {
  border-radius: 999px !important; background: #1C1E22 !important; color: #F3EEE4 !important; font-family: var(--serif); letter-spacing: .06em; padding: 12px 22px !important; }
.td-woo .button.alt, .td-woo #place_order { background: linear-gradient(135deg, #e3c88f, #c9a96e 45%, #b08c52) !important; color: #1C1E22 !important; }
.td-woo input.input-text, .td-woo select, .td-woo textarea { padding: 10px 12px; border: 1px solid #DCD6CA; border-radius: 10px; font: inherit; background: #fff; }
.td-woo table.shop_table { border-radius: 14px; overflow: hidden; }
