/* :root:root 提升优先级，压过数据库 Custom CSS 里残留的旧 :root 调色板（米色/金棕）。 */
:root:root {
  --bc-header-h: 72px;
  --bc-container: 1480px;
  --bc-bg: #ffffff;
  --bc-soft: #faf8f4;
  --bc-image-bg: #f4f1ec;
  --bc-ink: #211913;
  --bc-hero-ink: #1a120d;
  --bc-copy: #4f463e;
  --bc-muted: #7a6f64;
  --bc-subtle: #a39a90;
  --bc-border: #ece7df;
  --bc-border-strong: #d8d0c4;
  --bc-accent: #a98a68;
  --bc-sale: #e01020;
  --bc-accent-line: #c9b69c;
  --bc-hero-accent: #c9ae8d;
  /* luxuryrepbags 风格：标题与正文统一无衬线。 */
  --bc-serif: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  --bc-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  --wd-header-general-h: var(--bc-header-h);
  --wd-header-general-sticky-h: var(--bc-header-h);
  --wd-primary-color: var(--bc-accent);
  --wd-alternative-color: var(--bc-ink);
  --wd-text-color: var(--bc-muted);
  --wd-title-color: var(--bc-ink);
  --wd-entities-title-color: var(--bc-ink);
  --wd-entities-title-color-hover: var(--bc-accent);
  --wd-link-color: var(--bc-ink);
  --wd-link-color-hover: var(--bc-accent);
  --wd-form-brd-color: var(--bc-border);
  --wd-form-brd-color-focus: var(--bc-accent);
  --wd-form-brd-radius: 0px;
  --btn-default-bgcolor: var(--bc-ink);
  --btn-default-bgcolor-hover: #28221c;
  --btn-accented-bgcolor: var(--bc-ink);
  --btn-accented-bgcolor-hover: #28221c;
  --btn-default-brd-radius: 0px;
  --btn-accented-brd-radius: 0px;
  /* 数据库 Custom CSS 残留的旧调色板变量，重映射到当前白色系，消除米色/金棕残留。 */
  --bc-cream: var(--bc-bg);
  --bc-warm-white: var(--bc-bg);
  --bc-dark: var(--bc-ink);
  --bc-mid: #28221c;
  --bc-gold: var(--bc-accent);
  --bc-text: var(--bc-copy);
}

html {
  scroll-padding-top: var(--bc-header-h);
}

body {
  background: var(--bc-bg) !important;
  color: var(--bc-muted);
  font-family: var(--bc-sans) !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  font-family: var(--bc-sans) !important;
}

h1,
h2,
h3,
h4,
h5,
h6,
.wd-entities-title,
.wd-entities-title a {
  color: var(--bc-ink) !important;
}

::selection {
  background: rgba(169, 135, 106, .22);
  color: var(--bc-ink);
}

/* ---- 压制数据库 Custom CSS 残留的旧规则（金棕价格、白底面包屑条、金字按钮）。
   残留规则在我们之后输出且带 !important，这里用 html 前缀提高优先级。 ---- */
html :is(.price, .woocommerce-Price-amount) {
  color: var(--bc-ink) !important;
  font-family: var(--bc-sans) !important;
}

/* 促销价红色仅用于商品详情页（与 luxuryrepbags 一致，列表为深色）。 */
html .single-product .summary .price ins,
html .single-product .summary .price ins .woocommerce-Price-amount {
  color: var(--bc-sale) !important;
  text-decoration: none !important;
}

html .price ins {
  text-decoration: none !important;
}

html .price del,
html .price del .woocommerce-Price-amount {
  color: var(--bc-subtle) !important;
}

/* 残留规则把所有金额锁死 16px，会把商品页大价格压小。 */
html .woocommerce-Price-amount {
  font-size: inherit !important;
}

html .price del {
  color: var(--bc-subtle) !important;
}

html :is(.wd-breadcrumbs, .woocommerce-breadcrumb) {
  background: transparent !important;
  border-bottom: 0 !important;
  padding: 0 !important;
}

html :is(.woodmart-btn, .wd-btn),
html .wc-proceed-to-checkout .checkout-button,
html .woocommerce-pagination ul li span.current {
  color: #fff !important;
}

/* SALE 标签：白底细黑边黑字（luxuryrepbags 风格）。 */
body.wd .product-labels .product-label,
body.wd :is(.onsale, .woodmart-label.sale-label) {
  border: 1px solid var(--bc-ink) !important;
  border-radius: 0 !important;
  background: #fff !important;
  color: var(--bc-ink) !important;
}
