/* Z-Core catalog v2 (2026-11-28) — loaded after styles.css */

:root {
  --wechat: #07c160;
  --wechat-dark: #06a552;
}

/* ---------- buttons ---------- */
.button.wechat {
  color: var(--white);
  background: var(--wechat);
  box-shadow: 0 10px 22px rgba(7, 193, 96, 0.2);
}
.button.wechat:hover { background: var(--wechat-dark); }
.wc-icon { width: 20px; height: 20px; fill: currentColor; flex: none; }
.text-button {
  padding: 0;
  border: 0;
  color: var(--blue-700);
  background: none;
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- header ---------- */
.main-nav .nav-wechat { background: var(--wechat); }
.main-nav .nav-wechat:hover { background: var(--wechat-dark); }
.main-nav b.js-list-count,
.header-list b {
  min-width: 18px;
  height: 18px;
  margin-left: 4px;
  padding: 0 5px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: var(--white);
  background: var(--warm);
  font-size: 10.5px;
  line-height: 1;
}
.main-nav b.js-list-count[hidden],
.header-list b[hidden] { display: none; }
.header-list { display: none; }

@media (max-width: 780px) {
  .header-list {
    margin-left: auto;
    padding: 9px 12px;
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--navy-900);
    font-size: 13px;
    font-weight: 750;
  }
  .site-header { gap: 10px; }
}

/* ---------- product cards ---------- */
.product-card-image { position: relative; }
.variant-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(22, 58, 99, 0.9);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.01em;
}
.card-swatches {
  padding: 6px 10px 0;
  display: flex;
  align-items: center;
  gap: 5px;
}
.card-swatches img {
  width: 30px;
  height: 30px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f7fafc;
}
.card-swatches b {
  height: 30px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--navy-900);
  background: var(--blue-50);
  font-size: 11px;
}
.product-card-title { font-size: 14px; min-height: 39px; }
.card-sku { font-size: 11px; margin: 3px 0 4px; }
.card-size { color: #4d6577; font-size: 12px; }
.card-tags { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; }
.card-tags i {
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--blue-700);
  background: var(--blue-50);
  font-size: 10.5px;
  font-style: normal;
  font-weight: 700;
}
.product-card-body { min-height: 0; padding-bottom: 12px; }

/* ---------- home: category tiles + steps ---------- */
.category-tiles {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}
.category-tile {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  transition: box-shadow 160ms ease, transform 160ms ease;
}
.category-tile:hover { box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.category-tile-image { aspect-ratio: 4 / 3; padding: 8px; background: #f7fafc; }
.category-tile-image img { width: 100%; height: 100%; object-fit: contain; }
.category-tile-body { padding: 10px 12px 12px; display: grid; gap: 2px; }
.category-tile-body strong { color: var(--navy-950); font-size: 14px; line-height: 1.3; }
.category-tile-body small { color: var(--muted); font-size: 12px; font-weight: 650; }
.category-tile-body small span { color: var(--blue-700); }
.how-steps {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  list-style: none;
  counter-reset: step;
}
.how-steps li {
  padding: 22px;
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  counter-increment: step;
}
.how-steps li::before {
  content: counter(step);
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--navy-900);
  font-weight: 800;
}
.how-steps strong { color: var(--navy-950); font-size: 16px; }
.how-steps span { color: var(--muted); font-size: 14px; }

/* ---------- catalog ---------- */
.catalog-main { padding-bottom: 40px; }
.catalog-toolbar {
  width: min(var(--max-width), calc(100% - 48px));
  margin: 6px auto 0;
  display: grid;
  gap: 10px;
}
.catalog-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid #c9d8e3;
  border-radius: 12px;
  background: var(--white);
}
.catalog-search i { color: var(--muted); font-size: 20px; font-style: normal; }
.catalog-search input {
  width: 100%;
  min-height: 46px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 16px; /* 16px stops iOS zooming in */
}
.chip-row-wrap { display: flex; align-items: center; gap: 8px; min-width: 0; }
.chip-row-wrap[hidden] { display: none; }
.chip-row-label {
  flex: none;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.chip-row {
  min-width: 0;
  display: flex;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  min-height: 36px;
  padding: 7px 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #c9d8e3;
  border-radius: 999px;
  color: #34506a;
  background: var(--white);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.chip small { color: var(--muted); font-size: 11px; font-weight: 700; }
.chip.active { color: var(--white); border-color: var(--navy-900); background: var(--navy-900); }
.chip.active small { color: rgba(255, 255, 255, 0.75); }
.chip:disabled { opacity: 0.4; cursor: default; }
.chip-row.sub .chip { min-height: 32px; border-radius: 9px; background: var(--blue-50); border-color: transparent; }
.chip-row.sub .chip.active { background: var(--blue-700); }
.chip-row.tags .chip { min-height: 32px; font-size: 12.5px; }
.chip-row.tags .chip.active { background: var(--blue-700); border-color: var(--blue-700); }

.catalog-results-v2 { width: min(var(--max-width), calc(100% - 48px)); margin: 0 auto; }
.results-head {
  margin: 20px 0 14px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}
.results-head h1 {
  margin: 0;
  color: var(--navy-950);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.results-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.results-head p strong { color: var(--navy-950); }
.results-head .text-button { margin-left: 8px; }
.sort-select { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 700; flex: none; }
.sort-select select { min-height: 36px; padding: 0 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--white); font-size: 13px; }
.catalog-results-v2 .catalog-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.load-more-wrap { margin-top: 26px; }

/* floating list pill */
.list-pill {
  position: fixed;
  right: 16px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 80;
  padding: 11px 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  color: var(--white);
  background: var(--navy-900);
  box-shadow: var(--shadow-md);
  font-size: 14px;
  font-weight: 750;
}
.list-pill[hidden] { display: none; }
.list-pill strong {
  min-width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--navy-950);
  background: var(--warm);
  font-size: 12px;
}
.list-pill i { font-style: normal; }
body[data-page="product"] .list-pill { display: none; }

/* ---------- product page ---------- */
.product-category a { color: inherit; }
.product-category a:hover { text-decoration: underline; }
.selected-line { color: var(--navy-950) !important; font-size: 13px !important; letter-spacing: 0 !important; font-weight: 700 !important; }
.selected-line b { color: var(--blue-700); }
.product-tags { margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 6px; }
.product-tags[hidden] { display: none; }
.product-tags .tag {
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--blue-700);
  background: var(--blue-50);
  font-size: 12px;
  font-weight: 750;
}
.variant-block { padding: 14px; }
.variant-label span { font-size: 11px; }
.variant-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 8px;
  max-height: 420px;
  overflow-y: auto;
}
.variant-tile {
  padding: 4px 4px 6px;
  display: grid;
  gap: 3px;
  border: 1.5px solid #d3e0e9;
  border-radius: 10px;
  background: var(--white);
  text-align: center;
}
.variant-tile-image { aspect-ratio: 1 / 1; border-radius: 7px; overflow: hidden; background: #f7fafc; }
.variant-tile-image img { width: 100%; height: 100%; object-fit: cover; }
.variant-tile-name {
  overflow: hidden;
  color: var(--navy-950);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.variant-tile small { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 9.5px; }
.variant-tile.active { border-color: var(--navy-900); box-shadow: 0 0 0 2px rgba(22, 58, 99, 0.18); }
.inquiry-panel.v2 { display: grid; gap: 14px; }
.inquiry-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.js-add-list.added { color: var(--wechat-dark); border-color: var(--wechat); }
.alt-contact { color: var(--muted); font-size: 12.5px; text-decoration: underline; text-underline-offset: 3px; }
#spec-title-sku { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }

.mobile-inquiry-bar.v2 { display: none; }
@media (max-width: 780px) {
  .mobile-inquiry-bar.v2 {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 10px;
  }
  .mobile-inquiry-bar.v2 .button { max-width: none; min-height: 48px; padding: 10px 12px; }
  .mobile-inquiry-bar.v2 .button.secondary.added { color: var(--wechat-dark); }
  .inquiry-panel.v2 .inquiry-actions { display: none; }
}

/* ---------- inquiry + WeChat page ---------- */
.inquiry-main {
  width: min(1040px, calc(100% - 32px));
  margin: 10px auto 60px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  align-items: start;
}
.list-section, .wechat-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
}
.list-head h1 {
  margin: 0 0 6px;
  color: var(--navy-950);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  font-weight: 600;
}
.list-head h1 small {
  margin-left: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  color: var(--navy-950);
  background: var(--warm-soft);
  font-family: Inter, ui-sans-serif, sans-serif;
  font-size: 15px;
  vertical-align: middle;
}
.list-head p { margin: 0; color: var(--muted); font-size: 14px; }
.list-head p a { color: var(--blue-700); font-weight: 700; }
.list-steps { margin: 6px 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; list-style: none; color: #34506a; font-size: 13px; font-weight: 650; }
.list-steps b {
  width: 20px; height: 20px; margin-right: 4px;
  display: inline-grid; place-items: center;
  border-radius: 50%; color: var(--white); background: var(--navy-900); font-size: 11px;
}
.list-items { margin: 0 0 16px; padding: 0; display: grid; gap: 8px; list-style: none; max-height: 52vh; overflow-y: auto; }
.list-item {
  padding: 8px;
  display: grid;
  grid-template-columns: 56px 1fr 32px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.list-item-image { width: 56px; height: 56px; border-radius: 8px; overflow: hidden; background: #f7fafc; }
.list-item-image img { width: 100%; height: 100%; object-fit: cover; }
.list-item-body { min-width: 0; display: grid; gap: 1px; }
.list-item-body strong { overflow: hidden; color: var(--navy-950); font-size: 13px; line-height: 1.3; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.list-item-body span { color: var(--blue-700); font-size: 12px; font-weight: 700; }
.list-item-body code { color: var(--muted); font-size: 11.5px; }
.list-remove { width: 32px; height: 32px; border: 0; border-radius: 8px; color: var(--muted); background: var(--blue-50); font-size: 20px; line-height: 1; }
.list-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.list-preview { margin: 14px 0 10px; color: var(--muted); font-size: 13px; }
.list-preview pre {
  margin: 8px 0 0;
  padding: 12px;
  white-space: pre-wrap;
  border-radius: 10px;
  color: var(--ink);
  background: var(--blue-50);
  font-size: 12px;
  user-select: all;
  -webkit-user-select: all;
}
.wechat-card { text-align: center; scroll-margin-top: 16px; }
.wechat-card h2 { margin: 0; color: var(--navy-950); font-family: Georgia, "Times New Roman", serif; font-size: 26px; font-weight: 600; }
.wechat-sub { margin: 6px 0 14px; color: var(--muted); font-size: 14px; }
.wechat-qr {
  width: min(300px, 100%);
  height: auto;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  -webkit-touch-callout: default;
}
.wechat-hint { margin: 12px 0; color: #34506a; font-size: 13px; line-height: 1.6; }
.wechat-id {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  border-radius: 12px;
  background: var(--blue-50);
}
.wechat-id span { color: var(--muted); font-size: 12px; font-weight: 750; letter-spacing: 0.06em; text-transform: uppercase; }
.wechat-id strong { color: var(--navy-950); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 17px; }
.wechat-id .button { min-height: 38px; padding: 8px 14px; }
.wechat-alt { margin: 14px 0 0; color: var(--muted); font-size: 13px; }
.wechat-alt a { color: var(--blue-700); font-weight: 700; }

/* ---------- responsive ---------- */
@media (max-width: 1050px) {
  .catalog-results-v2 .catalog-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .category-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 780px) {
  .catalog-toolbar, .catalog-results-v2 { width: calc(100% - 24px); }
  .catalog-results-v2 .catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .category-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .how-steps { grid-template-columns: 1fr; }
  .inquiry-main { grid-template-columns: 1fr; }
  .section { padding-top: 44px; padding-bottom: 44px; }
}
@media (max-width: 640px) {
  .catalog-results-v2 .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .category-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .results-head { align-items: start; }
  .results-head h1 { font-size: 24px; }
  .product-card-title { font-size: 13.5px; }
  .card-swatches img, .card-swatches b { width: 26px; height: 26px; }
  .card-swatches b { width: auto; }
  .list-pill { bottom: calc(14px + env(safe-area-inset-bottom)); }
  .list-section, .wechat-card { padding: 16px; }
}

.spec-sku {
  margin-left: 8px;
  padding: 3px 9px;
  border-radius: 8px;
  color: var(--navy-900);
  background: var(--blue-50);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.5em;
  letter-spacing: 0;
  vertical-align: middle;
}

/* ---------- language switcher (EN / 中文 / ES / PT) ---------- */
.lang-menu { position: relative; order: 3; flex: none; }
.lang-menu > summary {
  list-style: none;
  cursor: pointer;
  padding: 8px 11px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--navy-900);
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
  user-select: none;
}
.lang-menu > summary::-webkit-details-marker { display: none; }
.lang-menu > summary svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.lang-menu[open] > summary { border-color: var(--blue-700); }
.lang-list {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 60;
  min-width: 150px;
  padding: 6px;
  display: grid;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 14px 34px rgba(16, 38, 66, 0.16);
}
.lang-list a {
  padding: 10px 12px;
  border-radius: 9px;
  color: var(--navy-900);
  font-size: 14px;
  font-weight: 650;
}
.lang-list a:hover { background: rgba(22, 58, 99, 0.06); }
.lang-list a.current { color: var(--blue-700); font-weight: 800; }
.lang-list a.current::after { content: " ✓"; }
.site-header > .main-nav { margin-left: auto; }
@media (max-width: 780px) {
  .lang-menu { order: 0; }
  .lang-menu > summary { padding: 9px 10px; }
  .header-list + .lang-menu { margin-left: 0; }
}
@media (max-width: 780px) {
  .header-list { white-space: nowrap; }
}
@media (max-width: 430px) {
  .site-header { gap: 8px; }
  .lang-menu > summary { padding: 9px; }
  .lang-menu > summary span { display: none; }
}
