/*
Theme Name: TPR Catalog
Theme URI: https://twdpayrmb.com/
Author: TPR
Description: WooCommerce-backed TPR product and service catalog theme with ordering disabled.
Version: 1.2.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: twd-catalog
*/

:root {
  --bg: #fff8ef;
  --bg-soft: #fffdf9;
  --surface: #ffffff;
  --surface-warm: #fff3e2;
  --text: #24170f;
  --muted: #7a6252;
  --line: #f1ddc6;
  --brand: #ff7a1a;
  --brand-dark: #d95a00;
  --brand-soft: #fff0de;
  --accent: #1fbf75;
  --accent-soft: #e8fbf1;
  --gold: #ffbd38;
  --radius: 8px;
  --shadow: 0 12px 32px rgba(129, 70, 18, .12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover,
a:focus {
  color: var(--brand-dark);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
}

.container {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 14px rgba(129, 70, 18, .08);
  backdrop-filter: blur(12px);
}

.header-main {
  display: grid;
  grid-template-columns: 164px minmax(240px, 1fr) auto;
  align-items: center;
  gap: 22px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.brand img {
  width: 164px;
  height: 48px;
}

.search-form {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 610px;
  justify-self: center;
  padding: 5px;
  background: #fff;
  border: 2px solid var(--brand);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(255, 122, 26, .12);
}

.search-form label {
  flex: 1;
  min-width: 0;
}

.search-form input[type="search"],
.search-form input[type="text"] {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  padding: 10px 12px;
}

.search-form button {
  min-width: 92px;
  border: 0;
  border-radius: 6px;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  padding: 10px 16px;
}

.search-form button:hover,
.search-form button:focus {
  background: var(--brand-dark);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.header-link,
.mobile-menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
  padding: 8px 12px;
}

.mobile-menu-button {
  display: none;
  width: 44px;
  padding: 0;
}

.main-nav {
  border-top: 1px solid var(--line);
  background: #fffaf3;
}

.nav-row {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 44px;
  margin: 0 auto;
  padding-top: 0;
  padding-bottom: 0;
  list-style: none;
  overflow-x: auto;
}

.nav-row a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  font-size: .92rem;
  font-weight: 800;
  white-space: nowrap;
}

.nav-row a:hover,
.nav-row .current-menu-item > a {
  color: var(--brand-dark);
}

.site-main {
  background:
    image-set(url("pc-index-bg.png") 1x) top center / 100% auto no-repeat,
    linear-gradient(180deg, #fff5e9 0, #fff8ef 420px, #fffdf9 100%);
}

.home-main {
  padding: 24px 0 0;
}

.admin-sync-panel {
  margin-bottom: 16px;
  border: 1px solid rgba(31, 191, 117, .34);
  border-radius: var(--radius);
  background: #f1fff7;
  color: #145c3b;
  padding: 12px 14px;
}

.admin-sync-panel form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.admin-sync-panel strong {
  font-weight: 900;
}

.admin-sync-panel span {
  color: #31704e;
  font-size: .9rem;
}

.admin-sync-panel button {
  border: 0;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  padding: 8px 12px;
}

.admin-sync-panel p {
  margin: 8px 0 0;
  font-size: .9rem;
  font-weight: 800;
}

.home-hero {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
  min-height: 330px;
}

.service-rail,
.hero-panel,
.quick-card,
.product-card,
.category-panel,
.advantage,
.detail-panel,
.consult-box {
  border: 1px solid rgba(241, 221, 198, .9);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--shadow);
}

.service-rail {
  padding: 18px 14px;
}

.service-rail h2 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.service-rail ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.service-rail a {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 42px;
  border-radius: 7px;
  color: var(--text);
  font-weight: 750;
  padding: 5px 8px;
}

.service-rail a:hover,
.service-rail a:focus {
  background: var(--brand-soft);
}

.rail-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--surface-warm);
  color: var(--brand-dark);
  font-size: .72rem;
  font-weight: 900;
}

.rail-icon.rail-image {
  background: transparent;
}

.rail-icon img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.hero-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 34px;
  background:
    linear-gradient(110deg, rgba(255, 255, 255, .98) 0%, rgba(255, 255, 255, .9) 54%, rgba(255, 240, 222, .82) 100%),
    url("pc-index-bg.png") center / cover no-repeat;
}

.announcement {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 122, 26, .24);
  border-radius: 999px;
  background: rgba(255, 246, 233, .88);
  color: var(--brand-dark);
  font-size: .9rem;
  font-weight: 800;
  padding: 8px 14px;
}

.hero-panel h1 {
  max-width: 680px;
  margin: 0;
  color: var(--text);
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero-panel p {
  max-width: 640px;
  margin: 14px 0 22px;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-panel .search-form {
  justify-self: start;
  max-width: 650px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
}

.hero-tags span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .78);
  color: var(--muted);
  font-size: .85rem;
  font-weight: 750;
  padding: 6px 10px;
}

.section {
  padding: 46px 0 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.section-head h1,
.section-head h2,
.section-head h3,
.category-panel-head h3 {
  margin: 0;
  line-height: 1.18;
  letter-spacing: 0;
}

.section-head h2 {
  font-size: 1.55rem;
}

.section-head p {
  max-width: 620px;
  margin: 6px 0 0;
  color: var(--muted);
}

.text-link {
  color: var(--brand-dark);
  font-size: .92rem;
  font-weight: 850;
  white-space: nowrap;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.quick-card {
  display: flex;
  min-height: 156px;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px;
  transition: transform .18s ease, box-shadow .18s ease;
}

.quick-card:hover,
.quick-card:focus {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(129, 70, 18, .16);
}

.quick-thumb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 8px;
  background: var(--brand-soft);
}

.quick-thumb img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.quick-card strong {
  color: var(--text);
  font-size: .98rem;
  line-height: 1.25;
}

.quick-card > span:last-child {
  color: var(--muted);
  font-size: .84rem;
  font-weight: 750;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.product-card {
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}

.product-card:hover,
.product-card:focus-within {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(129, 70, 18, .16);
}

.product-thumb {
  display: flex;
  aspect-ratio: 1 / .72;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(135deg, rgba(255, 246, 233, .96), rgba(232, 251, 241, .95)),
    var(--surface-warm);
  border-bottom: 1px solid var(--line);
}

.product-thumb img {
  width: 76px;
  height: 76px;
  object-fit: contain;
}

.product-body {
  display: flex;
  min-height: 148px;
  flex-direction: column;
  gap: 10px;
  padding: 15px;
}

.product-title {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  font-weight: 850;
  line-height: 1.34;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 700;
}

.product-excerpt {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--gold);
  font-weight: 850;
}

.category-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.category-panel {
  padding: 18px;
}

.category-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.category-panel-head h3 {
  font-size: 1.08rem;
}

.category-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.category-links a {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
  color: var(--text);
  font-size: .92rem;
  font-weight: 800;
  padding: 10px 12px;
}

.category-link-thumb {
  display: none;
}

.category-link-title {
  min-width: 0;
}

.category-links a:hover,
.category-links a:focus {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.category-links small {
  color: var(--accent);
  font-size: .76rem;
  font-weight: 900;
  white-space: nowrap;
}

.article-section {
  padding-top: 48px;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 22px 18px;
}

.article-card {
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(129, 70, 18, .08);
  transition: transform .18s ease, box-shadow .18s ease;
}

.article-card:hover,
.article-card:focus-within {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(129, 70, 18, .14);
}

.article-thumb {
  position: relative;
  display: block;
  margin: 12px 12px 0;
  overflow: hidden;
  border: 2px solid #ffbb83;
  border-radius: 8px;
  background: #fff4e7;
  aspect-ratio: 2.16 / 1;
}

.article-thumb::before {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  right: 0;
  height: 13px;
  background:
    repeating-linear-gradient(90deg, #fff 0 5px, transparent 5px 10px) 8px 5px / 72px 4px no-repeat,
    linear-gradient(90deg, #ff7d1c, #ff912b);
  content: "";
}

.article-thumb::after {
  position: absolute;
  z-index: 1;
  top: 5px;
  right: 8px;
  width: 20px;
  height: 4px;
  background: repeating-linear-gradient(90deg, #fff 0 4px, transparent 4px 8px);
  content: "";
}

.article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-body {
  min-height: 72px;
  padding: 16px 16px 18px;
}

.article-body h3 {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 1rem;
  font-weight: 760;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.article-archive {
  padding-top: 42px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: .94rem;
}

.breadcrumb a {
  color: var(--text);
}

.breadcrumb a::after {
  margin-left: 8px;
  color: var(--muted);
  content: "/";
}

.article-pagination {
  display: flex;
  justify-content: center;
  margin-top: 36px;
}

.article-pagination ul {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.article-pagination a,
.article-pagination span {
  display: inline-flex;
  min-width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  font-weight: 800;
}

.article-pagination .current {
  color: var(--brand);
}

.article-detail-wrap {
  padding-top: 42px;
}

.article-detail {
  border-radius: 0;
  background: #ffffff;
  padding: 54px min(4vw, 64px) 64px;
}

.article-detail-head {
  text-align: center;
}

.article-detail-head h1 {
  max-width: 980px;
  margin: 0 auto 22px;
  color: var(--text);
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  line-height: 1.3;
}

.article-detail-meta {
  display: flex;
  justify-content: center;
  gap: 34px;
  color: var(--muted);
  font-size: 1rem;
}

.article-hero-image {
  display: block;
  width: 100%;
  max-height: 470px;
  margin: 58px auto 34px;
  object-fit: cover;
}

.article-content {
  max-width: 1180px;
  margin: 0 auto;
}

.article-content h2 {
  margin-top: 28px;
  color: #000000;
  font-size: 1.38rem;
}

.article-content p {
  color: #111111;
  font-size: 1.04rem;
  line-height: 1.9;
}

.trust-page {
  padding-top: 36px;
}

.trust-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--shadow);
  padding: 42px;
}

.trust-header {
  max-width: 820px;
  margin-bottom: 30px;
}

.trust-header h1 {
  margin: 8px 0 12px;
  color: var(--text);
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.12;
}

.trust-header p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.8;
}

.trust-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.trust-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
  padding: 22px;
}

.trust-section h2 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 1.18rem;
}

.trust-section p,
.trust-section li {
  color: #433126;
  font-size: .98rem;
  line-height: 1.86;
}

.trust-section p {
  margin: 0;
}

.trust-section ul {
  margin: 0;
  padding-left: 1.2em;
}

.trust-section li + li {
  margin-top: 8px;
}

.advantages {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  padding-bottom: 10px;
}

.advantage {
  border-top: 4px solid var(--accent);
  padding: 18px;
}

.advantage strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
}

.advantage p {
  margin: 0;
  color: var(--muted);
  font-size: .92rem;
}

.site-footer {
  margin-top: 48px;
  border-top: 1px solid var(--line);
  background: #24170f;
  color: #d8c6b7;
  padding: 42px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 28px;
}

.footer-grid h2,
.footer-grid h3 {
  margin: 0 0 12px;
  color: #fff8ef;
  font-size: 1rem;
}

.footer-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-grid li + li {
  margin-top: 8px;
}

.footer-grid a:hover,
.footer-grid a:focus {
  color: #ffffff;
}

.catalog-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr);
  gap: 28px;
  align-items: start;
}

.detail-panel,
.consult-box {
  padding: 22px;
}

.detail-panel h1,
.detail-panel h2,
.consult-box h2,
.consult-box h3 {
  margin-top: 0;
}

.detail-panel h1 {
  margin-bottom: 14px;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.14;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.detail-meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--brand-dark);
  font-size: .86rem;
  font-weight: 850;
  padding: 7px 11px;
}

.detail-summary {
  margin: 0 0 20px;
  border-left: 4px solid var(--brand);
  background: var(--brand-soft);
  color: var(--text);
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.7;
  padding: 14px 16px;
}

.entry-content {
  color: var(--text);
  font-size: .98rem;
  line-height: 1.82;
}

.entry-content p {
  margin: 0 0 16px;
}

.entry-content h2 {
  margin: 28px 0 10px;
  color: var(--text);
  font-size: 1.18rem;
  line-height: 1.35;
}

.detail-panel > img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--brand-soft);
}

.consult-box {
  position: sticky;
  top: 116px;
  margin-top: 22px;
  background: var(--accent-soft);
}

.consult-box h2 {
  margin-bottom: 10px;
  font-size: 1.08rem;
}

.consult-box p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: .94rem;
  line-height: 1.7;
}

.consult-box .button,
.consult-box a.button,
.consult-box button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: var(--radius);
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  font-weight: 850;
  padding: 11px 16px;
}

.woocommerce-ordering,
.woocommerce-result-count,
.cart,
.single_add_to_cart_button,
.add_to_cart_button,
.checkout-button,
.wc-proceed-to-checkout,
.price {
  display: none !important;
}

.tpr-service-widget {
  position: fixed;
  right: 24px;
  top: 50%;
  z-index: 60;
  transform: translateY(-50%);
}

.service-card {
  width: 118px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 18px 36px rgba(36, 23, 15, .18);
  overflow: visible;
}

.service-card button {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: center;
}

.service-live,
.service-card button {
  display: flex;
  min-height: 96px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 8px;
}

.service-live {
  border-radius: 18px 18px 0 0;
  background: #141626;
  color: #ffffff;
}

.service-live strong,
.service-line strong,
.service-top strong {
  line-height: 1;
  font-size: 1.42rem;
  font-weight: 950;
  letter-spacing: 0;
}

.service-live small,
.service-line span,
.service-top small {
  font-size: .86rem;
  line-height: 1.2;
}

.service-headset {
  position: relative;
  width: 36px;
  height: 30px;
  border: 4px solid #d7d7d7;
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  box-shadow: inset 0 0 0 2px #0d0f1f;
}

.service-headset::before,
.service-headset::after {
  position: absolute;
  bottom: -8px;
  width: 8px;
  height: 16px;
  border-radius: 5px;
  background: #d7d7d7;
  content: "";
}

.service-headset::before {
  left: -4px;
}

.service-headset::after {
  right: -4px;
}

.service-item {
  position: relative;
  border-bottom: 1px solid #eeeeee;
  background: #ffffff;
}

.service-chat-icon {
  position: relative;
  width: 32px;
  height: 25px;
  border: 2px solid #222;
  border-radius: 6px;
}

.service-chat-icon::before {
  position: absolute;
  left: 8px;
  bottom: -7px;
  width: 9px;
  height: 9px;
  border-right: 2px solid #222;
  border-bottom: 2px solid #222;
  background: #fff;
  content: "";
  transform: rotate(45deg);
}

.service-chat-icon::after {
  position: absolute;
  top: 10px;
  left: 7px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #222;
  box-shadow: 8px 0 0 #222, 16px 0 0 #222;
  content: "";
}

.service-wechat strong {
  font-size: 1rem;
  font-weight: 500;
}

.service-line {
  background: #35d36f;
  color: #ffffff;
}

.service-line button {
  min-height: 100px;
}

.service-top {
  min-height: 96px;
  border-radius: 0 0 18px 18px;
  background: #ffffff;
  color: #151a2b;
}

.service-top span {
  margin-bottom: -2px;
  color: #18233c;
  font-size: 2rem;
  font-weight: 950;
  line-height: .75;
}

.service-top strong {
  color: #17213b;
}

.service-qr-popover {
  position: absolute;
  top: 50%;
  right: calc(100% + 16px);
  width: 190px;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 18px 36px rgba(36, 23, 15, .18);
  opacity: 0;
  padding: 14px;
  pointer-events: none;
  text-align: center;
  transform: translate(12px, -50%);
  transition: opacity .18s ease, transform .18s ease;
}

.service-qr-popover img {
  width: 150px;
  height: 150px;
  margin: 0 auto;
  object-fit: contain;
}

.service-qr-popover p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: .92rem;
}

.service-item:hover .service-qr-popover,
.service-item:focus-within .service-qr-popover,
.service-item.is-open .service-qr-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translate(0, -50%);
}

@media (max-width: 980px) {
  .container {
    width: min(100% - 24px, 760px);
  }

  .site-main {
    background:
      image-set(url("wap-index-bg.png") 1x) top center / 100% auto no-repeat,
      linear-gradient(180deg, #fff5e9 0, #fff8ef 390px, #fffdf9 100%);
  }

  .header-main {
    grid-template-columns: 132px 1fr auto;
    gap: 10px;
    min-height: 64px;
  }

  .brand img {
    width: 132px;
    height: auto;
  }

  .header-main > .search-form {
    grid-column: 1 / -1;
    order: 3;
    max-width: none;
    margin-bottom: 12px;
  }

  .header-link {
    display: none;
  }

  .mobile-menu-button {
    display: inline-flex;
  }

  .main-nav {
    display: none;
  }

  .main-nav:has([data-primary-nav].is-open),
  [data-primary-nav].is-open {
    display: block;
  }

  .nav-row {
    display: block;
    max-height: 70vh;
    padding: 8px 0 14px;
    overflow-y: auto;
  }

  .nav-row li + li {
    border-top: 1px solid var(--line);
  }

  .nav-row a {
    display: flex;
    padding: 12px 0;
  }

  .home-hero,
  .category-stack,
  .footer-grid,
  .catalog-detail {
    grid-template-columns: 1fr;
  }

  .service-rail {
    order: 2;
  }

  .service-rail ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-panel {
    min-height: 330px;
    padding: 24px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(255, 243, 226, .86)),
      url("wap-index-bg.png") center / cover no-repeat;
  }

  .announcement {
    width: auto;
    border-radius: 8px;
  }

  .section {
    padding-top: 36px;
  }

  .section-head {
    display: block;
  }

  .tpr-service-widget {
    right: 12px;
    top: auto;
    bottom: 18px;
    transform: none;
  }

  .service-card {
    width: 92px;
    border-radius: 14px;
  }

  .service-live,
  .service-card button {
    min-height: 76px;
    padding: 9px 6px;
  }

  .service-live {
    border-radius: 14px 14px 0 0;
  }

  .service-live strong,
  .service-line strong,
  .service-top strong {
    font-size: 1.08rem;
  }

  .service-live small,
  .service-line span,
  .service-top small,
  .service-wechat strong {
    font-size: .78rem;
  }

  .service-headset {
    width: 30px;
    height: 24px;
    border-width: 3px;
  }

  .service-chat-icon {
    width: 28px;
    height: 22px;
  }

  .service-line button,
  .service-top {
    min-height: 78px;
  }

  .service-qr-popover {
    right: calc(100% + 10px);
    width: 166px;
    padding: 10px;
  }

  .service-qr-popover img {
    width: 140px;
    height: 140px;
  }

  .quick-grid,
  .product-grid,
  .article-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-detail {
    padding: 34px 20px 42px;
  }

  .trust-panel {
    padding: 26px 18px;
  }

  .trust-content {
    grid-template-columns: 1fr;
  }

  .article-detail-meta {
    flex-direction: column;
    gap: 8px;
  }

  .article-hero-image {
    margin-top: 34px;
  }

  .advantages {
    grid-template-columns: 1fr;
  }

  .consult-box {
    position: static;
  }
}

@media (min-width: 981px) and (max-width: 1180px) {
  .container {
    width: min(100% - 40px, 1040px);
  }

  .home-hero {
    grid-template-columns: 230px minmax(0, 1fr);
  }

  .quick-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .article-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .advantages {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  /* v119-mobile-dense-layout */
  .home-main {
    padding-top: 10px;
  }

  .header-main {
    grid-template-columns: 120px 1fr;
  }

  .header-actions {
    justify-self: end;
  }

  .brand img {
    width: 120px;
  }

  .search-form button {
    min-width: 74px;
    padding-inline: 10px;
  }

  .section {
    padding-top: 28px;
  }

  .section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
  }

  .section-head h2 {
    font-size: 1.32rem;
  }

  .section-head p {
    display: none;
  }

  .hero-panel {
    min-height: 0;
    padding: 18px;
  }

  .hero-panel h1 {
    font-size: 1.9rem;
  }

  .hero-panel p {
    font-size: .98rem;
    line-height: 1.72;
  }

  .hero-tags {
    gap: 8px;
  }

  .hero-tags span {
    padding: 8px 12px;
    font-size: .84rem;
  }

  .quick-grid,
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .article-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .quick-card {
    min-height: 142px;
    padding: 12px 8px;
    align-items: center;
    text-align: center;
  }

  .quick-thumb {
    width: 58px;
    height: 58px;
  }

  .quick-thumb img {
    width: 44px;
    height: 44px;
  }

  .quick-card strong {
    display: -webkit-box;
    min-height: 2.45em;
    overflow: hidden;
    font-size: .86rem;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .quick-card > span:last-child {
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand-dark);
    padding: 5px 10px;
    font-size: .76rem;
  }

  .product-card {
    border-radius: 8px;
  }

  .product-thumb {
    aspect-ratio: 1 / .82;
  }

  .product-thumb img {
    width: 56px;
    height: 56px;
  }

  .product-body {
    min-height: 86px;
    gap: 6px;
    padding: 10px 8px;
  }

  .product-title {
    display: -webkit-box;
    min-height: 2.55em;
    overflow: hidden;
    font-size: .82rem;
    line-height: 1.28;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .product-meta {
    font-size: .72rem;
  }

  .product-excerpt {
    display: none;
  }

  .category-stack {
    gap: 16px;
  }

  .category-panel {
    padding: 16px 12px;
  }

  .category-panel-head {
    margin-bottom: 12px;
  }

  .category-links {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px 8px;
  }

  .category-links a {
    display: grid;
    min-height: 0;
    justify-items: center;
    gap: 7px;
    border: 0;
    background: transparent;
    padding: 0;
    text-align: center;
  }

  .category-link-thumb {
    display: inline-flex;
    width: 58px;
    height: 58px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(129, 70, 18, .08);
  }

  .category-link-thumb img {
    width: 46px;
    height: 46px;
    object-fit: contain;
  }

  .category-link-title {
    display: -webkit-box;
    width: 100%;
    overflow: hidden;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.26;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .category-links small {
    display: none;
  }

  .article-section {
    padding-top: 30px;
  }

  .article-card {
    border-radius: 8px;
  }

  .article-thumb {
    aspect-ratio: 1.78 / 1;
  }

  .article-body {
    min-height: 54px;
    padding: 10px 9px 12px;
  }

  .article-body h3 {
    font-size: .84rem;
    line-height: 1.34;
    -webkit-line-clamp: 2;
  }

  .tpr-service-widget {
    right: 8px;
    bottom: 78px;
  }

  .service-card {
    width: 76px;
    border-radius: 12px;
  }

  .service-live,
  .service-card button,
  .service-line button,
  .service-top {
    min-height: 62px;
    padding: 7px 5px;
  }

  .service-live strong,
  .service-line strong,
  .service-top strong {
    font-size: .92rem;
  }

  .service-live small,
  .service-line span,
  .service-top small,
  .service-wechat strong {
    font-size: .7rem;
  }

  .service-headset {
    width: 26px;
    height: 21px;
  }

  .service-chat-icon {
    width: 24px;
    height: 19px;
  }

  .service-qr-popover {
    width: 150px;
  }

  .service-qr-popover img {
    width: 126px;
    height: 126px;
  }
}
