/* ============================================================
   Crystal Collar Customiser — styles (v2)
   v2 变化：预览从「金属刻字板」改为「项圈上的贴片字母」，
   支持 有/无字母、水晶/金属字母、银/金色 三组独立选项。
   命名统一 cc- 前缀，避免与主题冲突。
   ============================================================ */

.cc {
  --cc-ink: #1c1c1c;
  --cc-cream: #fffcf0;
  --cc-grey: #f8f8f8;
  --cc-line: #dddddd;
  --cc-muted: #727070;
  --cc-error: #b3261e;
  --cc-chip-radius: 12px;

  /* 项圈皮料色，可按商品覆盖 */
  --cc-strap-a: #8a5433;
  --cc-strap-b: #6b3c23;
  --cc-strap-c: #7c472b;
  --cc-stitch: rgba(240, 170, 110, 0.55);

  font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--cc-ink);
  margin: 18px 0 20px;
}

/* ---- 主题隔离层 ---------------------------------------------------
   主题（区块主题 / Elementor）会给 p、span、button 套上自己的字体、
   字号、行高、外边距和外观。这里只用 :where() 做「零特异性」重置，
   组件自己的规则写在后面，仍然能覆盖它。 */
.cc :where(p, span, label, button, input, div, b, strong, em, small) {
  font-family: inherit;
  letter-spacing: normal;
  text-transform: none;
  text-align: left;
  color: inherit;
  text-shadow: none;
}
.cc :where(p) {
  margin: 0;
  padding: 0;
}
.cc :where(button) {
  margin: 0;
  box-shadow: none;
  font-weight: 500;
}
.cc :where(input) {
  margin: 0;
  box-shadow: none;
}

.cc *,
.cc *::before,
.cc *::after { box-sizing: border-box; }

.cc__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.cc__title {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.cc__free { font-size: 12px; color: var(--cc-muted); white-space: nowrap; }

/* ------------------------------------------------------------
   预览：白色区域，里面显示文字和图案
   ------------------------------------------------------------ */
.cc__preview {
  margin-bottom: 8px;
  padding: 18px 14px;
  min-height: 148px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--cc-line);
  border-radius: 14px;
  box-shadow:
    inset 0 1px 2px rgba(28, 28, 28, 0.05),
    0 1px 0 rgba(255, 255, 255, 0.9);
}

.cc-strap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 104px;
  padding: 0 30px;
  border-radius: 16px;
  overflow: hidden;
  background:
    linear-gradient(180deg,
      rgba(255, 255, 255, 0.16) 0%,
      rgba(255, 255, 255, 0) 18%,
      rgba(0, 0, 0, 0) 62%,
      rgba(0, 0, 0, 0.28) 100%),
    linear-gradient(180deg, var(--cc-strap-a) 0%, var(--cc-strap-b) 48%, var(--cc-strap-c) 70%, var(--cc-strap-b) 100%);
  box-shadow:
    inset 0 3px 3px rgba(255, 255, 255, 0.16),
    inset 0 -4px 8px rgba(0, 0, 0, 0.34),
    0 4px 12px rgba(0, 0, 0, 0.18);
}

/* 上下两道缝线 */
.cc-strap::before,
.cc-strap::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  height: 0;
  border-top: 1.5px dashed var(--cc-stitch);
  pointer-events: none;
}
.cc-strap::before { top: 13px; }
.cc-strap::after { bottom: 13px; }

/* 两端铆钉 */
.cc-strap__rivet {
  position: absolute;
  top: 50%;
  width: 13px;
  height: 13px;
  margin-top: -6.5px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #ffffff 0%, #d6d6d6 38%, #8d8d8d 78%, #6d6d6d 100%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.45), inset 0 -1px 1px rgba(0, 0, 0, 0.25);
  z-index: 2;
}
.cc-strap__rivet--l { left: 12px; }
.cc-strap__rivet--r { right: 12px; }
.cc-strap--gold .cc-strap__rivet {
  background: radial-gradient(circle at 34% 30%, #fff8dd 0%, #e3c778 38%, #a98631 78%, #8a6b22 100%);
}

/* 字母容器 */
.cc-letters {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.075em;
  max-width: 100%;
  overflow: hidden;
  padding: 2px 0;
}

.cc-char {
  display: block;
  line-height: 1;
  white-space: nowrap;
  transition: font-size 0.15s ease;
  will-change: transform;
}

/* 金属字母 */
.cc-char--metal {
  color: transparent;
  background-image: linear-gradient(180deg, #ffffff 0%, #dcdcdc 34%, #9d9d9d 52%, #efefef 66%, #b7b7b7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.45)) drop-shadow(0 0 1px rgba(0, 0, 0, 0.3));
}
.cc-char--metal.cc-char--gold {
  background-image: linear-gradient(180deg, #fff6d8 0%, #ecd28d 34%, #b8912f 52%, #f7e7b4 66%, #c9a549 100%);
}

/* 水晶字母：小圆点模拟密集水钻 + 金属底 */
.cc-char--crystal {
  color: transparent;
  background-image:
    radial-gradient(circle at 4px 4px, rgba(255, 255, 255, 0.98) 1.25px, rgba(255, 255, 255, 0) 1.75px),
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.75) 0.85px, rgba(255, 255, 255, 0) 1.3px),
    linear-gradient(180deg, #ffffff 0%, #dfe3e7 38%, #a9b0b7 56%, #f3f6f8 74%, #b8c0c7 100%);
  background-size: 7px 7px, 5px 5px, 100% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  filter:
    drop-shadow(0 1px 0 rgba(0, 0, 0, 0.55))
    drop-shadow(0 0 1px rgba(40, 40, 40, 0.5))
    drop-shadow(0 0 1.2px rgba(255, 255, 255, 0.85));
}
.cc-char--crystal.cc-char--gold {
  background-image:
    radial-gradient(circle at 4px 4px, rgba(255, 255, 255, 0.98) 1.25px, rgba(255, 255, 255, 0) 1.75px),
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.7) 0.85px, rgba(255, 255, 255, 0) 1.3px),
    linear-gradient(180deg, #ffffff 0%, #f6e6b8 38%, #c9a94f 56%, #fdf3d3 74%, #d8bb6a 100%);
  background-size: 7px 7px, 5px 5px, 100% 100%;
}

/* 图案（皇冠 / 爱心 / 星星 / 爪印）：不套金属或水钻质感，保持原样 */
.cc-char--symbol {
  background: none;
  color: #cfcfcf;
  -webkit-text-fill-color: currentColor;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.5));
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Segoe UI Symbol", sans-serif;
  text-transform: none;
}
.cc-char--symbol.cc-char--gold { color: #e3c778; }

/* 字体 */
.cc-font-block {
  font-family: "Bebas Neue", "Oswald", "Arial Narrow", Impact, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.cc-font-script {
  font-family: "Great Vibes", "Snell Roundhand", "Segoe Script", "Brush Script MT", cursive;
  text-transform: none;
  letter-spacing: 0.01em;
}
.cc-font-serif {
  font-family: "Playfair Display", "Abhaya Libre", Georgia, "Times New Roman", serif;
  text-transform: none;
}

.cc__meta {
  margin: -4px 0 14px;
  font-size: 11px;
  line-height: 1.3;
  letter-spacing: 0.02em;
  color: var(--cc-muted);
  text-align: center;
}

.cc-strap__empty {
  position: relative;
  z-index: 1;
  font-size: 14px;
  letter-spacing: 0.01em;
  text-transform: none;
  color: #a8a49d;
}

/* ------------------------------------------------------------
   控件
   ------------------------------------------------------------ */
.cc__field {
  display: flex;
  align-items: center;
  border: 1px solid var(--cc-line);
  background: #fff;
  padding: 0 12px;
  min-height: 54px;
}
.cc__field[data-disabled="true"] {
  background: #f6f5f2;
  opacity: 0.65;
}
.cc__input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 16px;              /* 防 iOS 聚焦缩放 */
  color: var(--cc-ink);
  padding: 12px 0;
      text-transform: uppercase;
      letter-spacing: .06em;
  letter-spacing: 0.04em;
}
.cc__input::placeholder { color: #b3b0ad; text-transform: none; letter-spacing: 0; }
.cc__counter {
  flex: 0 0 auto;
  margin-left: 10px;
  font-size: 12px;
  color: var(--cc-muted);
  font-variant-numeric: tabular-nums;
}
.cc__counter[data-over="true"] { color: var(--cc-error); }

/* 分段：加 / 不加字母 */
.cc-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--cc-line);
  background: var(--cc-grey);
  margin-bottom: 12px;
}
.cc-seg button {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 11px 8px;
  font-size: 12.5px;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--cc-muted);
  cursor: pointer;
}
.cc-seg button[aria-pressed="true"] {
  background: #fff;
  color: var(--cc-ink);
  box-shadow: inset 0 0 0 1px var(--cc-ink);
}

/* 字体 chip */
.cc__styles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}
.cc-chip {
  appearance: none;
  border: 1px solid var(--cc-line);
  background: var(--cc-grey);
  border-radius: var(--cc-chip-radius);
  padding: 9px 6px 8px;
  cursor: pointer;
  display: grid;
  gap: 2px;
  justify-items: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.cc-chip:hover { border-color: #b9b6b1; }
.cc-chip__sample { font-size: 20px; line-height: 1.05; color: var(--cc-ink); }
.cc-chip__label {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cc-muted);
}
.cc-chip[aria-pressed="true"] { border-color: var(--cc-ink); background: #fff; }
.cc-chip[aria-pressed="true"] .cc-chip__label { color: var(--cc-ink); }

/* 水晶开关 */
.cc-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  appearance: none;
  border: 1px solid var(--cc-line);
  background: #fff;
  padding: 12px;
  cursor: pointer;
  text-align: left;
  margin-top: 2px;
}
.cc-toggle[aria-pressed="true"] { border-color: var(--cc-ink); }
.cc-toggle__track {
  flex: 0 0 auto;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: #d8d5cf;
  position: relative;
  transition: background 0.18s ease;
}
.cc-toggle__dot {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
  transition: transform 0.18s ease;
}
.cc-toggle[aria-pressed="true"] .cc-toggle__track { background: var(--cc-ink); }
.cc-toggle[aria-pressed="true"] .cc-toggle__dot { transform: translateX(16px); }
.cc-toggle__body { display: grid; gap: 1px; min-width: 0; }
.cc-toggle__label { font-size: 12.5px; color: var(--cc-ink); }
.cc-toggle__note { font-size: 11.5px; color: var(--cc-muted); }

/* 颜色 chip */
.cc__fills {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.cc-fill {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--cc-line);
  background: #fff;
  padding: 7px 13px 7px 9px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
}
.cc-fill[aria-pressed="true"] { border-color: var(--cc-ink); }
.cc-fill__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
}
.cc-fill__dot--silver { background: linear-gradient(135deg, #ffffff, #b9b9b9 60%, #8f8f8f); }
.cc-fill__dot--gold   { background: linear-gradient(135deg, #fff3c9, #d8b95f 60%, #a9842f); }

/* 项圈颜色（紫 / 蓝 / 绿 / 粉，带闪粉质感） */
.cc-swatches,
.cc-colours {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cc-swatch {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--cc-line);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  font: inherit;
  line-height: 1;
  color: var(--cc-ink);
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.cc-swatch:hover { border-color: #b9b5ad; }
.cc-swatch__label { display: none; }
.cc-swatch[aria-pressed="true"] .cc-swatch__dot { transform: scale(0.94); }
.cc-swatch[aria-pressed="true"] {
  border-color: var(--cc-ink);
  box-shadow: inset 0 0 0 1px var(--cc-ink);
}

.cc-swatch__dot {
  position: relative;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.9),
    inset 0 -1px 3px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(0, 0, 0, 0.12);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

/* 闪粉：白点 + 细钻光 */
.cc-swatch__dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.95) 0 0.9px, rgba(255, 255, 255, 0) 1.4px),
    radial-gradient(circle, rgba(255, 255, 255, 0.7) 0 0.7px, rgba(255, 255, 255, 0) 1.2px);
  background-size: 6px 6px, 9px 9px;
  background-position: 0 0, 3px 4px;
  opacity: 0.75;
}

.cc-swatch:hover .cc-swatch__dot { transform: scale(1.06); }

.cc-swatch[aria-pressed="true"] .cc-swatch__dot {
  box-shadow:
    inset 0 0 0 3px rgba(255, 255, 255, 0.95),
    0 0 0 2px var(--cc-ink);
}

.cc-swatch__label {
  font-size: 13px;
  line-height: 1;
  color: var(--cc-ink);
}
.cc-swatch[aria-pressed="true"] .cc-swatch__label { color: var(--cc-ink); }

/* 符号条 */
.cc__symbols { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.cc__symbols[data-disabled="true"] { display: none; }
.cc-sym {
  appearance: none;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--cc-line);
  background: #fff;
  border-radius: 10px;
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
}
.cc-sym:hover { border-color: var(--cc-ink); }
.cc-sym:active { transform: scale(0.94); }

/* 费用 / 错误 / 提示 */
.cc__fee {
  margin-top: 10px;
  padding: 9px 12px;
  background: var(--cc-cream);
  border: 1px solid #efe6c8;
  font-size: 12.5px;
  color: #6b5a20;
  display: none;
}
.cc__fee[data-on="true"] { display: block; }

.cc__error {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--cc-error);
  display: none;
}
.cc__error[data-on="true"] { display: block; }

.cc__hint { margin-top: 8px; font-size: 12px; color: var(--cc-muted); line-height: 1.45; }

.cc[data-lettering="false"] .cc__styles,
.cc[data-lettering="false"] .cc-toggle,
.cc[data-lettering="false"] .cc__symbols { opacity: 0.45; pointer-events: none; }

/* 分组小标题 */
.cc__label {
  margin: 14px 0 6px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cc-muted);
}
.cc__label:first-of-type { margin-top: 4px; }

/* 移动端 */
@media (max-width: 749px) {
  .cc__preview { padding: 9px; }
  .cc-strap { min-height: 92px; padding: 0 22px; }
  .cc-chip__sample { font-size: 18px; }
  .cc-toggle { padding: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .cc *, .cc *::before, .cc *::after { transition: none !important; }
}

/* ---------------- 颜色 / 尺寸（定制器最上面：先 Colour，后 Size） ---------------- */
.cc__options {
  margin: 0 0 22px;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--cc-line);
}
.cc__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.cc__picked {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: .02em;
  color: var(--cc-muted);
}
.cc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cc-size {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 9px 14px;
  border: 1px solid var(--cc-line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  line-height: 1;
  color: var(--cc-ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.cc-size:hover { border-color: #b9b5ad; }
.cc-size[aria-pressed="true"] {
  border-color: var(--cc-ink);
  box-shadow: inset 0 0 0 1px var(--cc-ink);
}
.cc-size__code {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .02em;
}
.cc-size__range {
  font-size: 10.5px;
  letter-spacing: .01em;
  color: var(--cc-muted);
  white-space: nowrap;
}
.cc-size[aria-pressed="true"] .cc-size__range { color: var(--cc-ink); }
@media (max-width: 479px) {
  .cc-swatch { padding: 6px 10px 6px 6px; }
}

/* ---------- 变体商品：原生下拉框藏起来，数量改成 Etsy 式下拉 ---------- */
.cc[data-cc-hidden] { display: none; }
form.cart .variations[data-cc-hidden] { display: none !important; }

.cc-qty {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  height: 44px;
  min-width: 74px;
  padding: 0 36px 0 14px;
  border: 1px solid #dddddd;
  border-radius: 10px;
  background: #fff url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%231c1c1c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center;
  background-size: 12px 8px;
  font: inherit;
  font-size: 14px;
  color: #1c1c1c;
  cursor: pointer;
}

.cc-qty:focus-visible {
  outline: 2px solid #1c1c1c;
  outline-offset: 2px;
}

/* add-to-cart width: let the button run from the quantity box to the right edge */
.wp-block-woocommerce-add-to-cart-form .variations_button,
.wp-block-woocommerce-add-to-cart-form form.cart,
body.single-product .variations_button,
body.single-product form.cart {
  grid-template-columns: min-content 1fr !important;
}

.wp-block-woocommerce-add-to-cart-form .variations_button > .single_add_to_cart_button,
.wp-block-woocommerce-add-to-cart-form form.cart > .single_add_to_cart_button,
body.single-product .variations_button > .single_add_to_cart_button,
body.single-product form.cart > .single_add_to_cart_button {
  grid-column: 2 / -1 !important;
  justify-self: stretch !important;
  width: 100% !important;
  min-height: 52px;
  padding: 0 28px;
  text-align: center;
  box-sizing: border-box;
}

.wp-block-woocommerce-add-to-cart-form .quantity,
body.single-product .quantity {
  align-items: stretch;
}

.wp-block-woocommerce-add-to-cart-form .quantity .cc-qty,
body.single-product .quantity .cc-qty {
  height: 52px;
}

@media (max-width: 549px) {
  .wp-block-woocommerce-add-to-cart-form .variations_button,
  .wp-block-woocommerce-add-to-cart-form form.cart,
  body.single-product .variations_button,
  body.single-product form.cart {
    grid-template-columns: min-content 1fr !important;
  }
}

/* ---------- v2.0 profile engine additions ---------- */
.cc__switch { margin-top: 12px; }
.cc__switch .cc-toggle { width: 100%; }
.cc-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--cc-ink);
  padding: 6px 0;
  cursor: pointer;
}
.cc-check input { width: 16px; height: 16px; accent-color: var(--cc-ink); }
[data-cc-off="true"] { opacity: .45; }
.cc-toggle[disabled] { cursor: not-allowed; }
.cc-seg button[disabled] { cursor: not-allowed; }
.cc[data-lettering="false"] .cc__symbols { display: none; }
/* ---------- head: compact on/off pill ---------- */
.cc__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.cc__headText {
  min-width: 0;
  margin-left: auto;
  text-align: right;
}
.cc__title { margin: 0; }
.cc__playBtn { flex: 0 0 auto; }
.cc__pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px 0 13px;
  border: 1px solid var(--cc-ink);
  border-radius: 999px;
  background: #fff;
  color: var(--cc-ink);
  font: inherit;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .09em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.cc__pill:hover { background: #f4f2ec; }
.cc__pill:focus-visible { outline: 2px solid var(--cc-ink); outline-offset: 2px; }
.cc__pillDot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid currentColor;
  background: transparent;
  flex: 0 0 auto;
}
.cc__pill[aria-pressed="true"] { background: var(--cc-ink); border-color: var(--cc-ink); color: #fff; }
.cc__pill[aria-pressed="true"] .cc__pillDot { background: #fff; border-color: #fff; }
.cc__pill[aria-pressed="false"] .cc__pillLabel { color: var(--cc-muted); }
.cc__pill[aria-pressed="true"]:hover { background: #000; }

/* ---------- head: switch + Custom label ---------- */
.cc__pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--cc-ink);
  font: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.cc__pill:hover { background: none; }
.cc__pill:focus-visible { outline: 2px solid var(--cc-ink); outline-offset: 4px; border-radius: 6px; }
.cc-fieldswitch {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #d7d3ca;
  transition: background .16s ease;
  flex: 0 0 auto;
}
.cc-fieldswitch__dot {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(28, 28, 28, .28);
  transition: transform .16s ease;
}
.cc__pill[aria-pressed="true"] .cc-fieldswitch { background: var(--cc-ink); }
.cc__pill[aria-pressed="true"] .cc-fieldswitch__dot { transform: translateX(18px); }
.cc-fieldswitch__label {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--cc-ink);
}
.cc__pill[aria-pressed="false"] .cc-fieldswitch__label { color: var(--cc-muted); }

/* 图案按钮：矢量图标，避免各平台 emoji 字形不一致 */
.cc-sym { color: var(--cc-ink); }
.cc-sym svg { width: 22px; height: 22px; display: block; fill: currentColor; }
.cc-sym[disabled] { opacity: .35; cursor: default; }
/* 预览里的图案也用矢量图标，保证与产品实物一致 */
.cc-char svg { width: .78em; height: .78em; display: block; fill: currentColor; }
.cc-char--symbol svg { filter: drop-shadow(0 1px 0 rgba(0,0,0,.18)); }
/* ============================================================
   单品页排版：对齐 demo（左图集 / 右信息栏）
   只作用于 body.single-product，避免影响其它页面。
   ============================================================ */
body.single-product .wp-block-columns:has(.wp-block-woocommerce-product-image-gallery) {
  gap: 44px;
  align-items: start;
}
@media (max-width: 860px) {
  body.single-product .wp-block-columns:has(.wp-block-woocommerce-product-image-gallery) { gap: 24px; }
}

/* 图集：圆角 + 细边框 */
body.single-product .woocommerce-product-gallery__image,
body.single-product .woocommerce-product-gallery__image img,
body.single-product .wc-block-components-product-image img {
  border-radius: 16px;
}
body.single-product .woocommerce-product-gallery__image { overflow: hidden; }

/* 标题 */
body.single-product h1.wp-block-post-title {
  font-size: clamp(22px, 2.4vw, 27px) !important;
  font-weight: 500 !important;
  line-height: 1.25 !important;
  letter-spacing: -.01em !important;
  margin: 0 0 8px !important;
}

/* 价格 */
body.single-product .wp-block-woocommerce-product-price .woocommerce-Price-amount,
body.single-product .wp-block-woocommerce-product-price .amount {
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0;
}

/* 短描述 */
body.single-product .wp-block-post-excerpt__excerpt {
  font-size: 13.5px;
  line-height: 1.6;
  color: #727070;
  margin: 0 0 14px;
}

/* 加购按钮：黑底、大写、52px */
body.single-product .wp-block-woocommerce-add-to-cart-form .single_add_to_cart_button {
  background: #1c1c1c !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 10px !important;
  min-height: 52px !important;
  width: 100% !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
}
body.single-product .wp-block-woocommerce-add-to-cart-form .single_add_to_cart_button:hover {
  background: #000 !important;
}
body.single-product .wp-block-woocommerce-add-to-cart-form .quantity .cc-qty { height: 52px; }

/* 卖点条 */
.ccc-perks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
  line-height: 1.5;
  color: #727070;
}
.ccc-perks li { margin: 0; padding: 0; }
.ccc-perks li::before { content: "✓"; color: #1c1c1c; margin-right: 6px; }
/* ==== Product page skin: bring the page itself closer to the demo ==== */
body.single-product,
body.single-product .wp-site-blocks,
body.single-product main { background: #ffffff !important; }
body.single-product .wp-block-woocommerce-breadcrumbs,
body.single-product nav.woocommerce-breadcrumb { display: none !important; }
body.single-product .wp-block-woocommerce-product-meta { display: none !important; }
body.single-product .wp-block-woocommerce-product-image-gallery img,
body.single-product .woocommerce-product-gallery img { border-radius: 14px !important; }
body.single-product .wp-block-columns:has(.wp-block-woocommerce-product-image-gallery) { gap: 48px !important; }
body.single-product h1.wp-block-post-title { margin-bottom: 6px !important; }
body.single-product .wp-block-woocommerce-product-price { margin-bottom: 18px !important; }
body.single-product .wp-block-post-excerpt__excerpt,
body.single-product .woocommerce-product-details__short-description { font-size: 13.5px !important; color: #727070 !important; }
/* ============================================================
   Astra / classic-theme isolation (v2.7.0)
   Astra injects blue buttons, auto-width inputs and floats the
   quantity box; these rules re-assert the component design.
   ============================================================ */

/* --- the add-to-cart row: customiser full width, qty + button below --- */
.woocommerce div.product form.cart .woocommerce-variation-add-to-cart,
.woocommerce div.product .woocommerce-variation-add-to-cart.variations_button,
.woocommerce-variation-add-to-cart.variations_button{
	display:flex !important;
	flex-wrap:wrap !important;
	align-items:stretch !important;
	justify-content:flex-start !important;
	gap:10px !important;
}
.woocommerce-variation-add-to-cart > .cc{flex:1 1 100% !important;order:1 !important;margin:0 0 4px !important;}
.woocommerce-variation-add-to-cart > .quantity{order:2 !important;flex:0 0 auto !important;float:none !important;margin:0 !important;display:block !important;}
.woocommerce-variation-add-to-cart > .single_add_to_cart_button{order:3 !important;flex:1 1 220px !important;height:52px !important;margin:0 !important;}
.woocommerce-variation-add-to-cart > .ccc-perks,
.woocommerce-variation-add-to-cart > .ccc-leadtime{order:4 !important;flex:1 1 100% !important;}

/* --- quantity select --- */
.woocommerce div.product .quantity .cc-qty{
	height:52px !important;min-width:96px !important;padding:0 38px 0 16px !important;
	border:1px solid #dddddd !important;border-radius:10px !important;background-color:#ffffff !important;
	font-size:14px !important;color:#1c1c1c !important;box-shadow:none !important;
}

/* --- primary button skin --- */
.single-product .single_add_to_cart_button,
.single-product .single_add_to_cart_button.button.alt{
	background:#1c1c1c !important;background-color:#1c1c1c !important;color:#ffffff !important;
	border:0 !important;border-radius:10px !important;box-shadow:none !important;
	text-transform:uppercase !important;letter-spacing:.08em !important;
	font-size:13px !important;font-weight:500 !important;line-height:1.2 !important;
}
.single-product .single_add_to_cart_button:hover{background:#000000 !important;color:#ffffff !important;}
.single-product .single_add_to_cart_button:focus{outline:2px solid #1c1c1c !important;outline-offset:2px !important;}

/* --- perks / lead time --- */
.ccc-perks{
	display:grid !important;grid-template-columns:1fr 1fr !important;gap:6px 14px !important;
	margin:12px 0 0 !important;padding:0 !important;list-style:none !important;
	font-size:12px !important;line-height:1.45 !important;color:#727070 !important;
}
.ccc-perks li{margin:0 !important;padding:0 0 0 16px !important;position:relative !important;list-style:none !important;}
.ccc-perks li::before{content:"\2713" !important;position:absolute !important;left:0 !important;top:0 !important;color:#1c1c1c !important;}
.ccc-leadtime{font-size:12px !important;line-height:1.5 !important;color:#727070 !important;margin:6px 0 0 !important;}

/* --- component typography reset (Astra themes p/span/label heavily) --- */
.cc p,.cc span,.cc label,.cc div,.cc small,.cc strong{
	font-family:inherit !important;letter-spacing:normal !important;text-transform:none !important;
	text-shadow:none !important;box-shadow:none !important;
}
.cc p,.cc p.cc__label,.cc p.cc__picked,.cc p.cc__meta,.cc p.cc__fee,.cc p.cc__error,.cc p.cc__hint{margin:0 !important;padding:0 !important;font-weight:400 !important;}
.cc__label,.cc .cc__label{
	font-size:11px !important;font-weight:500 !important;letter-spacing:.14em !important;
	text-transform:uppercase !important;color:#727070 !important;line-height:1.4 !important;
}
.cc__row{display:flex !important;align-items:baseline !important;justify-content:space-between !important;gap:12px !important;margin:0 0 10px !important;}
.cc__picked{font-size:12.5px !important;color:#6f6b66 !important;line-height:1.4 !important;}
.cc__meta{font-size:12px !important;color:#727070 !important;text-align:center !important;margin:10px 0 0 !important;}

/* --- preview card --- */
.cc__preview{
	min-height:150px !important;display:flex !important;align-items:center !important;justify-content:center !important;
	padding:18px 16px !important;border:1px solid #dddddd !important;border-radius:14px !important;
	background:#ffffff !important;overflow:hidden !important;
}

/* --- text field --- */
.cc__field{
	display:flex !important;align-items:center !important;gap:10px !important;
	border:1px solid #dddddd !important;border-radius:10px !important;background:#ffffff !important;
	padding:0 14px !important;height:52px !important;margin:14px 0 12px !important;
}
.cc__field input.cc__input,
.cc__field input{
	flex:1 1 auto !important;width:100% !important;min-width:0 !important;height:50px !important;
	border:0 !important;border-radius:0 !important;background:transparent !important;
	font-size:15px !important;line-height:1 !important;color:#1c1c1c !important;
	padding:0 !important;margin:0 !important;box-shadow:none !important;outline:none !important;
}
.cc__field input::placeholder{color:#a8a49d !important;}
.cc__counter{
	flex:0 0 auto !important;font-size:12px !important;color:#8d8880 !important;
	letter-spacing:.02em !important;white-space:nowrap !important;
}

/* --- symbol buttons --- */
.cc__symbols{display:flex !important;gap:8px !important;margin:0 0 16px !important;flex-wrap:wrap !important;}
.cc .cc-sym{
	width:42px !important;height:42px !important;min-width:42px !important;padding:0 !important;
	display:inline-flex !important;align-items:center !important;justify-content:center !important;
	border:1px solid #dddddd !important;border-radius:10px !important;background:#ffffff !important;
	color:#1c1c1c !important;font-size:17px !important;line-height:1 !important;cursor:pointer !important;box-shadow:none !important;
}
.cc .cc-sym:hover{border-color:#1c1c1c !important;}
.cc .cc-sym svg{width:20px !important;height:20px !important;display:block !important;fill:currentColor !important;}

/* --- size chips --- */
.cc-chips{display:grid !important;grid-template-columns:repeat(3,minmax(0,1fr)) !important;gap:8px !important;margin:0 0 18px !important;}
.cc .cc-size{
	display:flex !important;flex-direction:column !important;align-items:center !important;justify-content:center !important;gap:2px !important;
	padding:10px 6px !important;border:1px solid #dddddd !important;border-radius:10px !important;background:#ffffff !important;
	cursor:pointer !important;box-shadow:none !important;
}
.cc .cc-size .cc-size__code{font-size:12px !important;font-weight:600 !important;color:#1c1c1c !important;line-height:1.2 !important;}
.cc .cc-size .cc-size__range{font-size:10px !important;color:#727070 !important;line-height:1.3 !important;text-align:center !important;}
.cc .cc-size[aria-pressed="true"]{border-color:#1c1c1c !important;box-shadow:inset 0 0 0 1px #1c1c1c !important;}

/* --- segmented control (letters material) --- */
.cc-seg{display:grid !important;grid-template-columns:1fr 1fr !important;gap:0 !important;margin:0 0 14px !important;}
.cc .cc-seg button{
	background:#f8f8f5 !important;color:#1c1c1c !important;border:1px solid #dddddd !important;
	font-size:12.5px !important;font-weight:400 !important;letter-spacing:0 !important;text-transform:none !important;
	padding:13px 10px !important;cursor:pointer !important;box-shadow:none !important;outline:none !important;border-radius:0 !important;
}
.cc .cc-seg button:first-child{border-radius:10px 0 0 10px !important;}
.cc .cc-seg button:last-child{border-radius:0 10px 10px 0 !important;border-left:0 !important;}
.cc .cc-seg button[aria-pressed="true"]{background:#ffffff !important;border-color:#1c1c1c !important;color:#1c1c1c !important;box-shadow:inset 0 0 0 1px #1c1c1c !important;}
.cc .cc-seg button:focus{outline:none !important;}

/* --- fee + error + hint --- */
.cc__fee{
	display:block !important;background:#fffcf0 !important;border:1px solid #f0e8d4 !important;
	border-radius:8px !important;color:#6b625a !important;font-size:12px !important;
	padding:10px 12px !important;margin:0 0 12px !important;
}
.cc__error{color:#b3261e !important;font-size:12px !important;margin:0 0 10px !important;}
.cc__hint{color:#727070 !important;font-size:12px !important;line-height:1.5 !important;margin:0 0 4px !important;}

/* --- head row (Custom switch) --- */
.cc__head{display:flex !important;align-items:center !important;justify-content:space-between !important;gap:12px !important;margin:4px 0 10px !important;}
.cc__headText{min-width:0 !important;margin-left:auto !important;text-align:right !important;}
.cc__free{font-size:12px !important;color:#8d8880 !important;}

/* --- generic swatch geometry (Astra shrinks inline-flex) --- */
.cc .cc-swatch{display:inline-flex !important;align-items:center !important;justify-content:center !important;box-shadow:none !important;}
.cc-swatches{display:flex !important;flex-wrap:wrap !important;gap:12px !important;margin:0 0 18px !important;}
/* --- product meta + breadcrumbs: keep the summary clean like the design --- */
.single-product .product_meta,
.single-product .ast-breadcrumbs-wrapper,
.single-product .woocommerce-breadcrumb,
.single-product .woocommerce-product-gallery__trigger{display:none !important;}

/* --- button label: price + fee in one line --- */
.single-product .single_add_to_cart_button{white-space:nowrap !important;}

/* single product: ignore leftover sidebar grid (Astra separate/two-container) */
body.single-product.ast-two-container .ast-container .ast-row{display:block !important}
body.single-product.ast-two-container #primary.content-area,
body.single-product.ast-two-container .content-area.primary{width:100% !important;max-width:100% !important;float:none !important}
body.single-product #secondary.widget-area,
body.single-product .widget-area.secondary{display:none !important}
body.single-product .ast-woocommerce-container{max-width:none !important}
