.tpc-product-builder {
  --tpc-accent: #0d6e8a;
  --tpc-ink: #16313b;
  --tpc-muted: #53666d;
  background:
    radial-gradient(circle at 88% 4%, rgba(64, 145, 161, .17), transparent 32rem),
    linear-gradient(145deg, #f8f5ed 0%, #eef4f2 100%);
  border: 1px solid rgba(31, 73, 83, .16);
  border-radius: 28px;
  box-shadow: 0 26px 70px rgba(33, 58, 66, .12);
  box-sizing: border-box;
  clear: both;
  color: var(--tpc-ink);
  margin: clamp(2.5rem, 6vw, 5.5rem) auto;
  max-width: var(--theme-normal-container-max-width, 1152px);
  overflow: hidden;
  padding: clamp(1.25rem, 3vw, 2.5rem);
  width: calc(100% - 32px);
}
.tpc-product-builder,
.tpc-product-builder * { box-sizing: border-box; }
.single-product .entry-summary-items > .ct-product-divider + .ct-product-divider { display: none; }
.tpc-product-builder__header { margin: 0 0 clamp(1.5rem, 4vw, 2.75rem); max-width: 780px; }
.tpc-product-builder__header h2 {
  color: var(--tpc-ink);
  font-size: clamp(1.75rem, 3.2vw, 3rem);
  letter-spacing: -.035em;
  line-height: 1.08;
  margin: 0 0 .75rem;
}
.tpc-product-builder__header > p:last-child { color: var(--tpc-muted); font-size: 1rem; margin: 0; }
.tpc-product-builder__eyebrow {
  color: var(--tpc-accent);
  font-size: .75rem;
  font-weight: 750;
  letter-spacing: .14em;
  margin: 0 0 .65rem;
  text-transform: uppercase;
}
.tpc-product-builder form.cart,
.tpc-product-builder form.variations_form {
  float: none !important;
  margin: 0 !important;
  max-width: none !important;
  width: 100% !important;
}
.tpc-product-builder table.variations { margin-bottom: 1.4rem; max-width: 760px; width: 100%; }
.tpc-product-builder table.variations select { min-height: 48px; width: 100%; }
.tpc-product-builder .single_variation_wrap,
.tpc-product-builder .woocommerce-variation-add-to-cart { width: 100%; }
.tpc-product-builder .woocommerce-variation-add-to-cart {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}
.tpc-configurator {
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(31, 73, 83, .15);
  border-radius: 22px;
  flex: 1 0 100%;
  margin: .8rem 0 1.4rem;
  padding: clamp(1rem, 2.4vw, 2rem);
  width: 100%;
}
.tpc-configurator > h3 { color: var(--tpc-ink, #16313b); font-size: clamp(1.3rem, 2.2vw, 1.8rem); margin: 0 0 .45rem; }
.tpc-configurator__notice { color: #505f64; font-size: .92rem; margin: 0; }
.tpc-preview {
  background:
    radial-gradient(circle at 50% 42%, #fff 0%, #f3efe5 48%, #e4ded2 100%);
  border: 1px solid rgba(31, 73, 83, .12);
  border-radius: 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
  height: clamp(310px, 52vw, 680px);
  margin: 1.4rem auto .7rem;
  max-width: none;
  overflow: hidden;
  position: relative;
  width: 100%;
}
.tpc-preview canvas { cursor: grab; display: block; height: 100%; touch-action: none; width: 100%; }
.tpc-preview canvas:active { cursor: grabbing; }
.tpc-preview canvas[data-tpc-viewer-mode="paint"],
.tpc-preview canvas[data-tpc-viewer-mode="paint"]:active { cursor: crosshair; }
.tpc-preview canvas:focus-visible { outline: 3px solid #0d6e8a; outline-offset: -3px; }
.tpc-preview__loading { left: 50%; margin: 0; position: absolute; top: 50%; transform: translate(-50%, -50%); }
.tpc-preview__reset,
.tpc-preview__fullscreen,
.tpc-preview__fold {
  background: rgba(23, 33, 43, .88);
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: .8rem;
  font-weight: 700;
  padding: .38rem .7rem;
  position: absolute;
  top: .65rem;
  z-index: 2;
}
.tpc-preview__reset { right: .65rem; }
.tpc-preview__fullscreen { left: .65rem; }
.tpc-preview__fold {
  bottom: .85rem;
  font-size: .9rem;
  left: 50%;
  min-width: 7.2rem;
  padding: .55rem 1.05rem;
  top: auto;
  transform: translateX(-50%);
}
.tpc-preview__fullscreen[hidden] { display: none; }
.tpc-preview__reset:hover,
.tpc-preview__fullscreen:hover,
.tpc-preview__fold:hover { background: #17212b; }
.tpc-preview__fold:disabled { cursor: wait; opacity: .62; }
.tpc-preview__reset:focus-visible,
.tpc-preview__fullscreen:focus-visible,
.tpc-preview__fold:focus-visible { outline: 3px solid #0d6e8a; outline-offset: 2px; }
.tpc-paint-tools {
  background: rgba(255, 253, 247, .9);
  border: 1px solid rgba(22, 49, 59, .24);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(23, 33, 43, .16);
  display: grid;
  gap: .35rem;
  padding: .35rem;
  position: absolute;
  right: calc(.65rem + env(safe-area-inset-right, 0px));
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
}
.tpc-paint-tools__mode,
.tpc-paint-tools__color {
  align-items: center;
  background: #fff;
  border: 1px solid #aeb8bb;
  border-radius: 11px;
  color: #26373d;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  font: inherit;
  font-size: .68rem;
  font-weight: 750;
  gap: .16rem;
  justify-content: center;
  line-height: 1.05;
  min-height: 48px;
  padding: .3rem .2rem;
  width: 52px;
}
.tpc-paint-tools__mode svg { height: 22px; width: 22px; }
.tpc-paint-tools__mode:hover,
.tpc-paint-tools__color:hover { border-color: #0d6e8a; }
.tpc-paint-tools__mode[aria-pressed="true"] {
  background: #0d6e8a;
  border-color: #0d6e8a;
  color: #fff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .84) inset;
}
.tpc-paint-tools__mode:disabled,
.tpc-paint-tools__color:disabled { cursor: wait; opacity: .55; }
.tpc-paint-tools__mode:focus-visible,
.tpc-paint-tools__color:focus-visible,
.tpc-paint-palette button:focus-visible,
.tpc-paint-palette input:focus-visible { outline: 3px solid rgba(13, 110, 138, .38); outline-offset: 2px; }
.tpc-paint-tools__color { background: #fffaf0; color: #33464d; }
.tpc-paint-tools__color > span:last-child {
  max-width: 46px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tpc-paint-tools__current-swatch { height: 1.35rem; width: 1.35rem; }
.tpc-paint-palette {
  background: rgba(255, 253, 247, .97);
  border: 1px solid rgba(22, 49, 59, .24);
  border-radius: 16px;
  box-shadow: 0 18px 45px rgba(23, 33, 43, .22);
  color: #26373d;
  display: flex;
  flex-direction: column;
  height: min(440px, calc(100% - 1.5rem));
  margin: 0;
  min-width: 0;
  overflow: hidden;
  padding: .85rem;
  position: absolute;
  right: calc(4.65rem + env(safe-area-inset-right, 0px));
  top: 50%;
  transform: translateY(-50%);
  width: min(270px, calc(100% - 5.75rem));
  z-index: 3;
}
.tpc-paint-palette[hidden] { display: none !important; }
.tpc-paint-palette legend {
  color: #16313b;
  font-size: 1rem;
  font-weight: 800;
  padding: 0 2.75rem 0 0;
}
.tpc-paint-palette__close {
  align-items: center;
  background: #fff;
  border: 1px solid #aeb8bb;
  border-radius: 999px;
  color: #26373d;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 1.15rem;
  height: 44px;
  justify-content: center;
  padding: 0;
  position: absolute;
  right: .55rem;
  top: .45rem;
  width: 44px;
}
.tpc-paint-palette__hint { color: #596a70; font-size: .75rem; line-height: 1.35; margin: .28rem 0 .55rem; }
.tpc-paint-palette__search {
  background: #fff;
  border: 1px solid #aeb8bb;
  border-radius: 9px;
  color: #26373d;
  font: inherit;
  font-size: .82rem;
  min-height: 40px;
  padding: .45rem .62rem;
  width: 100%;
}
.tpc-paint-palette__count { color: #596a70; font-size: .72rem; padding: .32rem 0; }
.tpc-paint-palette__list {
  display: grid;
  flex: 1 1 auto;
  gap: .35rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: .15rem .2rem .3rem .1rem;
}
.tpc-paint-palette__color {
  align-items: center;
  background: #fff;
  border: 1px solid #c5cdcf;
  border-radius: 9px;
  color: #26373d;
  cursor: pointer;
  display: grid;
  font: inherit;
  font-size: .74rem;
  font-weight: 650;
  gap: .35rem;
  grid-template-columns: auto minmax(0, 1fr);
  min-height: 40px;
  padding: .34rem .42rem;
  text-align: left;
}
.tpc-paint-palette__color[hidden] { display: none !important; }
.tpc-paint-palette__color > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpc-paint-palette__color:hover { border-color: #0d6e8a; }
.tpc-paint-palette__color[aria-pressed="true"] {
  background: #e9f6f8;
  border-color: #0d6e8a;
  box-shadow: 0 0 0 2px rgba(13, 110, 138, .14) inset;
}
.tpc-paint-palette__swatch { height: 1.2rem; width: 1.2rem; }
.tpc-preview__paint-status {
  background: rgba(255, 253, 247, .94);
  border: 1px solid rgba(22, 49, 59, .22);
  border-radius: 10px;
  color: #27454e;
  font-size: .78rem;
  font-weight: 700;
  left: .65rem;
  margin: 0;
  max-width: min(430px, calc(100% - 6rem));
  padding: .42rem .62rem;
  pointer-events: none;
  position: absolute;
  top: 3.25rem;
  z-index: 3;
}
.tpc-preview__paint-status:empty { display: none; }
.tpc-preview:fullscreen {
  height: 100vh;
  margin: 0;
  max-width: none;
  width: 100vw;
}
.tpc-preview::backdrop { background: #17212b; }
html.tpc-viewport-fullscreen-active,
body.tpc-viewport-fullscreen-active { overflow: hidden !important; }
.tpc-preview.is-tpc-viewport-fullscreen {
  height: 100vh;
  height: 100dvh;
  inset: 0;
  margin: 0;
  max-width: none;
  position: fixed;
  width: 100vw;
  z-index: 2147483646;
}
.tpc-preview__instructions { color: #505f64; font-size: .84rem; margin: 0 0 1.7rem; max-width: none; }
.tpc-preview.has-error { align-items: center; color: #8c1d18; display: flex; justify-content: center; padding: 1rem; }
.tpc-controls { display: grid; gap: 1rem; }
.tpc-controls__title { font-weight: 700; margin: 0 0 .55rem; }
.tpc-color-presets {
  background:
    linear-gradient(135deg, rgba(13, 110, 138, .08), rgba(219, 166, 23, .09)),
    #fff;
  border: 1px solid rgba(31, 73, 83, .18);
  border-radius: 14px;
  padding: clamp(.85rem, 2vw, 1.2rem);
}
.tpc-color-presets h4 { color: var(--tpc-ink); font-size: 1.05rem; margin: 0; }
.tpc-color-presets__description { color: var(--tpc-muted); font-size: .84rem; margin: .28rem 0 .8rem; }
.tpc-color-presets__list {
  display: grid;
  gap: .65rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.tpc-color-preset-button {
  align-items: center;
  background: rgba(255, 255, 255, .92);
  border: 1px solid #b7c3c6;
  border-radius: 10px;
  color: #1f2933;
  cursor: pointer;
  display: flex;
  font: inherit;
  font-weight: 700;
  gap: .65rem;
  justify-content: space-between;
  min-height: 52px;
  padding: .58rem .7rem;
  text-align: left;
}
.tpc-color-preset-button:hover { border-color: var(--tpc-accent); transform: translateY(-1px); }
.tpc-color-preset-button[aria-pressed="true"] {
  background: #e7f2f3;
  border-color: var(--tpc-accent);
  box-shadow: 0 0 0 2px rgba(13, 110, 138, .16);
}
.tpc-color-preset-button:focus-visible { outline: 3px solid rgba(13, 110, 138, .32); outline-offset: 2px; }
.tpc-color-preset-button__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpc-color-preset-button__swatches { align-items: center; display: inline-flex; flex: 0 0 auto; }
.tpc-color-preset-button__swatch { height: 1.05rem; margin-left: -.18rem; width: 1.05rem; }
.tpc-color-preset-button__swatch:first-child { margin-left: 0; }
.tpc-color-preset-button__more { color: #53666d; font-size: .72rem; margin-left: .25rem; }
.tpc-color-presets__status { color: #185b68; font-size: .82rem; font-weight: 650; margin: .65rem 0 0; }
.tpc-color-presets__status:empty { display: none; }
.tpc-part-selector {
  display: grid;
  gap: .65rem;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  max-height: none;
  overflow: visible;
  padding: .2rem;
}
.tpc-part-button {
  align-items: center;
  background: #fff;
  border: 1px solid #b9b9b9;
  border-radius: 6px;
  color: #1f2933;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 600;
  gap: .5rem;
  justify-content: flex-start;
  min-height: 42px;
  padding: .55rem .8rem;
  text-align: left;
}
.tpc-part-button:hover { border-color: #0d6e8a; }
.tpc-part-button[aria-pressed="true"] { border-color: #0d6e8a; box-shadow: 0 0 0 2px rgba(13, 110, 138, .16); }
.tpc-part-button__text { display: grid; line-height: 1.2; min-width: 0; }
.tpc-part-button__label,
.tpc-part-button__selection { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpc-part-button__selection { color: #5d6670; font-size: .78rem; font-weight: 500; margin-top: .16rem; }
.tpc-part-button__swatch,
.tpc-swatch {
  background-color: #fff;
  background-image:
    linear-gradient(45deg, #d9dde0 25%, transparent 25%),
    linear-gradient(-45deg, #d9dde0 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #d9dde0 75%),
    linear-gradient(-45deg, transparent 75%, #d9dde0 75%);
  background-position: 0 0, 0 4px, 4px -4px, -4px 0;
  background-size: 8px 8px;
  border: 1px solid rgba(0, 0, 0, .25);
  border-radius: 50%;
  display: inline-block;
  flex: 0 0 auto;
  height: 1.15rem;
  overflow: hidden;
  position: relative;
  width: 1.15rem;
}
.tpc-swatch__fill { inset: 0; position: absolute; }
.tpc-color-palette { background: #fbfbf8; border: 1px solid #d7d7d1; margin: 0; min-width: 0; padding: .85rem; }
.tpc-color-palette legend { font-weight: 700; padding: 0 .35rem; }
.tpc-color-palette__selection {
  background: #e7f2f3;
  border-radius: 999px;
  color: #185b68;
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  margin-left: .55rem;
  padding: .18rem .48rem;
  vertical-align: middle;
}
.tpc-color-filters {
  align-items: end;
  display: grid;
  gap: .65rem;
  grid-template-columns: minmax(180px, 1.4fr) minmax(150px, 1fr) auto;
  margin-bottom: .8rem;
}
.tpc-color-filter { color: #343b42; display: grid; font-size: .8rem; font-weight: 650; gap: .28rem; margin: 0; }
.tpc-color-filter input,
.tpc-color-filter select {
  background: #fff;
  border: 1px solid #9ca3aa;
  border-radius: 5px;
  color: #1f2933;
  font: inherit;
  min-height: 40px;
  padding: .45rem .55rem;
  width: 100%;
}
.tpc-color-filter input:focus-visible,
.tpc-color-filter select:focus-visible { border-color: #0d6e8a; outline: 2px solid rgba(13, 110, 138, .22); outline-offset: 1px; }
.tpc-color-result-count { color: #5b646d; font-size: .8rem; padding-bottom: .58rem; white-space: nowrap; }
.tpc-color-options { max-height: 560px; overflow-y: auto; padding: 0 .35rem .4rem 0; }
.tpc-color-group + .tpc-color-group { border-top: 1px solid #e1e2de; margin-top: .85rem; padding-top: .75rem; }
.tpc-color-group__title {
  background: #fbfbf8;
  color: #3e474f;
  font-size: .8rem;
  letter-spacing: .04em;
  margin: 0 0 .45rem;
  padding: .2rem 0;
  position: sticky;
  top: 0;
  z-index: 1;
}
.tpc-color-group__options { display: grid; gap: .42rem; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); }
.tpc-color-option {
  align-items: center;
  background: #fff;
  border: 1px solid #d7d9da;
  border-radius: 5px;
  cursor: pointer;
  display: grid;
  gap: .42rem;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  margin: 0;
  min-height: 44px;
  padding: .42rem .5rem;
}
.tpc-color-option:hover { border-color: #6195a0; }
.tpc-color-option:has(input:checked) { background: #eef8fa; border-color: #0d6e8a; }
.tpc-color-option[hidden],
.tpc-color-group[hidden] { display: none !important; }
.tpc-color-option__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpc-color-option__price { color: #5b646d; font-size: .73rem; white-space: nowrap; }
.tpc-part-button:focus-visible,
.tpc-color-option:has(input:focus-visible) { outline: 2px solid #0d6e8a; outline-offset: 2px; }
.tpc-configurator__status { color: #8c1d18; font-weight: 600; margin: .85rem 0 0; }
.tpc-configurator__pricing { border-top: 1px solid #dedfdb; margin-top: 1rem; padding-top: .7rem; }
.tpc-configurator__pricing p { color: #53616a; font-size: .86rem; margin: .25rem 0; }
.tpc-configurator__pricing [data-tpc-discount-row] { color: #287044; }
.tpc-configurator__pricing .tpc-configurator__total { color: #1f2933; font-size: 1rem; margin-top: .45rem; }
.single_add_to_cart_button.tpc-model-disabled { cursor: not-allowed; opacity: .55; }

@media (max-width: 782px) {
  .tpc-product-builder { border-radius: 20px; padding: 1rem; width: calc(100% - 20px); }
  .tpc-configurator { border-radius: 16px; padding: .85rem; }
  .tpc-preview { border-radius: 14px; }
  .tpc-paint-palette { width: min(250px, calc(100% - 5.35rem)); }
  .tpc-part-selector { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tpc-color-filters { grid-template-columns: 1fr; }
  .tpc-color-result-count { padding: 0; }
  .tpc-color-group__options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
  .tpc-product-builder__header h2 { font-size: 1.7rem; }
  .tpc-color-presets__list { grid-template-columns: 1fr; }
  .tpc-part-selector { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tpc-color-group__options { grid-template-columns: 1fr; }
  .tpc-color-options { max-height: 430px; }
  .tpc-color-option { grid-template-columns: auto auto minmax(0, 1fr); }
  .tpc-color-option__price { grid-column: 3; }
  .tpc-paint-tools {
    border-radius: 13px;
    padding: .28rem;
    right: calc(.35rem + env(safe-area-inset-right, 0px));
  }
  .tpc-paint-tools__mode,
  .tpc-paint-tools__color { min-height: 46px; width: 48px; }
  .tpc-paint-palette {
    height: min(420px, calc(100% - .8rem));
    padding: .7rem;
    right: calc(3.85rem + env(safe-area-inset-right, 0px));
    width: calc(100% - 4.55rem);
  }
  .tpc-paint-palette__list { gap: .3rem; }
  .tpc-paint-palette__color { min-height: 44px; }
  .tpc-preview__paint-status { left: .4rem; max-width: calc(100% - 4.8rem); top: 3rem; }
}
