.pc {
  --pc-accent: #1a1a1a;
  --pc-border: rgba(127, 127, 127, 0.35);
  margin: 1.25rem 0;
  font: inherit;
  color: inherit;
}
.pc[hidden] { display: none; }
.pc__heading { margin: 0 0 0.75rem; font-size: 1.1em; }

.pc__preview {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 1rem;
  border: 1px solid var(--pc-border);
}
.pc__preview-img { display: block; width: 100%; height: auto; }
.pc__tint {
  position: absolute; inset: 0;
  mix-blend-mode: multiply;
  opacity: 0; transition: opacity 0.2s, background-color 0.2s;
  pointer-events: none;
}
.pc__tint.is-active { opacity: 0.55; }
.pc__overlay {
  position: absolute;
  left: var(--pc-text-x); top: var(--pc-text-y);
  transform: translate(-50%, -50%);
  max-width: 90%;
  color: var(--pc-text-color, #fff);
  font-size: var(--pc-text-size, 32px);
  line-height: 1.1; text-align: center;
  white-space: pre-wrap; overflow-wrap: anywhere;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}
.pc__overlay--serif { font-family: Georgia, 'Times New Roman', serif; }
.pc__overlay--sans { font-family: 'Helvetica Neue', Arial, sans-serif; }
.pc__overlay--script { font-family: 'Brush Script MT', 'Segoe Script', cursive; }
.pc__overlay--mono { font-family: ui-monospace, Menlo, Consolas, monospace; }

.pc__fields { display: grid; gap: 1rem; }
.pc__field { position: relative; }
.pc__label { display: block; margin-bottom: 0.4rem; font-weight: 600; padding: 0; }
.pc__current { font-weight: 400; opacity: 0.75; }
.pc__input {
  width: 100%; box-sizing: border-box;
  padding: 0.65rem 0.75rem;
  font: inherit; color: inherit; background: transparent;
  border: 1px solid var(--pc-border); border-radius: 6px;
}
.pc__input:focus { outline: 2px solid var(--pc-accent); outline-offset: 1px; }
.pc__sel { position: relative; }
.pc__sel select.pc__input { appearance: none; -webkit-appearance: none; padding-right: 2.4rem; cursor: pointer; }
.pc__caret { position: absolute; right: 0.9rem; top: 50%; transform: translateY(-50%); display: flex; pointer-events: none; color: inherit; }
.pc__caret svg { width: 10px; height: 6px; }
.pc__count { position: absolute; right: 0; top: 0; font-size: 0.85em; opacity: 0.65; }

.pc__swatches { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pc__swatches legend { width: 100%; }
.pc__swatch-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pc__swatch {
  width: 2.25rem; height: 2.25rem; padding: 3px; box-sizing: border-box;
  border: 1px solid var(--pc-border); border-radius: 50%;
  cursor: pointer;
}
.pc__swatch-color { display: block; width: 100%; height: 100%; border-radius: 50%; background: #ddd; }
.pc__swatch-input:checked + .pc__swatch { border: 2px solid var(--pc-accent); padding: 2px; }
.pc__swatch-input:focus-visible + .pc__swatch { outline: 2px solid var(--pc-accent); outline-offset: 2px; }

.pc__check-label { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; }
.pc__checkbox { width: 1.1rem; height: 1.1rem; accent-color: var(--pc-accent); }

.pc__error { margin: 0.75rem 0 0; color: #c0392b; font-weight: 600; }
.pc__visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---- v2: all option types ---- */
.pc__set { display: grid; gap: 1rem; }
.pc__set + .pc__set { margin-top: 1rem; }
.pc__set-title { margin: 0; font-size: 1em; }
.pc__field[hidden] { display: none; }
.pc__field--inline { display: grid; grid-template-columns: minmax(8rem, 35%) 1fr; align-items: center; gap: 0.75rem; }
.pc__field--inline .pc__help, .pc__field--inline .pc__ferr { grid-column: 2; }
.pc__req { color: #c0392b; }
.pc__hint, .pc__muted { font-weight: 400; opacity: 0.7; }
.pc__help { margin: 0.35rem 0 0; font-size: 0.9em; opacity: 0.75; }
.pc__ferr { margin: 0.35rem 0 0; color: #c0392b; font-size: 0.9em; }
.pc__ferr[hidden] { display: none; }
.pc__tip { display: inline-grid; place-items: center; width: 1.1em; height: 1.1em; margin-left: 0.35em; border-radius: 50%; border: 1px solid currentColor; font-size: 0.75em; font-style: italic; cursor: help; position: relative; vertical-align: middle; }
.pc__tip:hover::after, .pc__tip:focus::after { content: attr(data-tip); position: absolute; bottom: 140%; left: 50%; transform: translateX(-50%); width: max-content; max-width: 16rem; padding: 0.4rem 0.6rem; background: #222; color: #fff; border-radius: 4px; font-style: normal; font-weight: 400; font-size: 0.85rem; z-index: 5; white-space: normal; }
.pc__vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; opacity: 0; }
.pc__group { border: 0; margin: 0; padding: 0; min-width: 0; }
.pc__values { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pc__choice { display: flex; align-items: center; gap: 0.5rem; width: 100%; }
.pc__field--radio .pc__values, .pc__field--checkbox .pc__values { flex-direction: column; gap: 0.35rem; }
.pc__choice-input { width: 1.05rem; height: 1.05rem; accent-color: var(--pc-accent); margin: 0; }
.pc__check { cursor: pointer; }
.pc__btn { display: inline-flex; align-items: center; justify-content: center; min-height: 2.5rem; padding: 0.4rem 0.9rem; border: 1px solid var(--pc-border); border-radius: 6px; cursor: pointer; background: transparent; color: inherit; font: inherit; }
.pc__btn--primary { background: var(--pc-accent); color: #fff; border-color: var(--pc-accent); }
.pc__choice-input:checked + .pc__btn { border: 2px solid var(--pc-accent); padding: calc(0.4rem - 1px) calc(0.9rem - 1px); font-weight: 600; }
.pc__choice-input:focus-visible + .pc__btn, .pc__choice-input:focus-visible + .pc__swatch { outline: 2px solid var(--pc-accent); outline-offset: 2px; }
.pc__swatch { width: 2.25rem; height: 2.25rem; padding: 3px; box-sizing: border-box; border: 1px solid var(--pc-border); border-radius: 50%; cursor: pointer; display: inline-block; }
.pc__swatch--large { width: 3.5rem; height: 3.5rem; }
.pc__swatch--square, .pc__swatch--square .pc__swatch-fill { border-radius: 6px; }
.pc__swatch-fill { display: block; width: 100%; height: 100%; border-radius: 50%; background: #ddd center / cover no-repeat; }
.pc__choice-input:checked + .pc__swatch { border: 2px solid var(--pc-accent); padding: 2px; }
.pc__switch { display: flex; align-items: center; gap: 0.6rem; cursor: pointer; font-weight: 600; }
.pc__switch-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pc__switch-ui { width: 2.4rem; height: 1.4rem; border-radius: 1rem; background: var(--pc-border); position: relative; transition: background 0.2s; flex: none; }
.pc__switch-ui::after { content: ""; position: absolute; top: 0.15rem; left: 0.15rem; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: #fff; transition: transform 0.2s; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.pc__switch-input:checked + .pc__switch-ui { background: var(--pc-accent); }
.pc__switch-input:checked + .pc__switch-ui::after { transform: translateX(1rem); }
.pc__switch-input:focus-visible + .pc__switch-ui { outline: 2px solid var(--pc-accent); outline-offset: 2px; }
.pc__rangewrap { display: flex; align-items: center; gap: 0.75rem; }
.pc__slider { flex: 1; accent-color: var(--pc-accent); }
.pc__out { min-width: 3rem; text-align: right; font-variant-numeric: tabular-nums; }
.pc__range2 { display: flex; gap: 0.5rem; align-items: center; }
.pc__field--color .pc__input { padding: 0.2rem; height: 2.6rem; width: 4rem; }
.pc__dd { position: relative; }
.pc__dd-btn { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; cursor: pointer; text-align: left; }
.pc__dd-face { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.pc__dd-pop { position: absolute; z-index: 10; left: 0; right: 0; top: calc(100% + 4px); padding: 0.25rem; background: var(--pc-bg, #fff); color: #222; border: 1px solid var(--pc-border); border-radius: 6px; box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.pc__dd-pop[hidden] { display: none; }
.pc__dd-list { margin: 0; padding: 0; list-style: none; max-height: 18rem; overflow: auto; }
.pc__dd-search { width: 100%; box-sizing: border-box; margin: 0 0 0.25rem; padding: 0.45rem 0.6rem; border: 1px solid var(--pc-border); border-radius: 4px; font: inherit; }
.pc__dd-none { margin: 0; padding: 0.45rem 0.5rem; opacity: .7; }
.pc__dd-opt[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.pc__dd-opt[hidden] { display: none; }
.pc__qty { display: flex; align-items: center; gap: .5rem; margin: .75rem 0 0; }
.pc__qty-box { display: inline-flex; align-items: stretch; border: 1px solid var(--pc-border); border-radius: 6px; overflow: hidden; }
.pc__qty-box button { width: 2.5rem; border: 0; background: transparent; font-size: 1.1rem; cursor: pointer; color: inherit; }
.pc__qty-box input { width: 3.5rem; border: 0; text-align: center; font: inherit; -moz-appearance: textfield; }
.pc__qty-box input::-webkit-inner-spin-button { -webkit-appearance: none; }
.pc__editing { margin: 0 0 .75rem; padding: .6rem .75rem; border-radius: 6px; background: rgba(63,174,76,.12); border: 1px solid rgba(63,174,76,.45); font-size: .9em; }
.pc-cart-edit { display: inline-block; margin-top: .35rem; font-size: .85em; text-decoration: underline; cursor: pointer; }
.pc-discount { margin: .75rem 0; }
.pc-discount__row { display: flex; gap: .5rem; }
.pc-discount__row input { flex: 1; min-width: 0; padding: .6rem .75rem; border: 1px solid rgba(127,127,127,.5); border-radius: 4px; font: inherit; }
.pc-discount__row button { padding: .6rem 1rem; border: 1px solid currentColor; border-radius: 4px; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.pc-discount__codes { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.pc-discount__code { display: inline-flex; gap: .4rem; align-items: center; padding: .2rem .55rem; border-radius: 99px; background: rgba(127,127,127,.15); font-size: .85em; }
.pc-discount__code button { border: 0; background: none; cursor: pointer; color: inherit; padding: 0; }
.pc-discount__msg { margin: .4rem 0 0; font-size: .85em; color: #b42318; }
.pc__dd-opt { display: flex; align-items: center; gap: 0.6rem; padding: 0.45rem 0.5rem; border-radius: 4px; cursor: pointer; }
.pc__dd-opt:hover, .pc__dd-opt:focus { background: rgba(127,127,127,.15); outline: none; }
.pc__dd-opt[aria-selected="true"] { font-weight: 600; box-shadow: inset 3px 0 0 var(--pc-accent); }
.pc__dd-img { width: 2rem; height: 2rem; object-fit: cover; border-radius: 4px; }
.pc__dd-color { width: 1.25rem; height: 1.25rem; border-radius: 50%; border: 1px solid var(--pc-border); flex: none; }
.pc__heading2 { margin: 0.25rem 0 0; }
.pc__para { margin: 0; white-space: pre-line; }
.pc__hr { border: 0; border-top: 1px solid var(--pc-border); margin: 0.25rem 0; }
.pc__link { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; }
.pc__dialog { border: 0; border-radius: 10px; padding: 1rem 1.25rem 1.25rem; max-width: min(40rem, calc(100vw - 32px)); width: 100%; box-sizing: border-box; }
.pc__dialog::backdrop { background: rgba(0,0,0,.45); }
.pc__dialog-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; gap: 1rem; }
.pc__html img { max-width: 100%; height: auto; }
.pc__html table { border-collapse: collapse; width: 100%; }
.pc__html td, .pc__html th { border: 1px solid var(--pc-border); padding: 0.35rem 0.5rem; }
.pc__x { background: none; border: 0; font-size: 1.4rem; line-height: 1; cursor: pointer; color: inherit; padding: 0 0.25rem; }
.pc__details { border: 1px solid var(--pc-border); border-radius: 8px; padding: 0.5rem 0.9rem; }
.pc__summary { cursor: pointer; font-weight: 600; padding: 0.25rem 0; }
.pc__group-body { display: grid; gap: 1rem; padding: 0.6rem 0 0.4rem; }
.pc__file { display: block; max-width: 100%; }
.pc__files { list-style: none; padding: 0; margin: 0.5rem 0 0; display: grid; gap: 0.4rem; }
.pc__file-item { display: flex; align-items: center; gap: 0.6rem; overflow-wrap: anywhere; }
.pc__file-thumb { width: 3rem; height: 3rem; object-fit: cover; border-radius: 4px; }
.pc__crop-frame { position: relative; overflow: hidden; width: 100%; background: #111; touch-action: none; cursor: grab; border-radius: 6px; }
.pc__crop-img { position: absolute; top: 0; left: 0; max-width: none; user-select: none; transform-origin: 0 0; }
.pc__crop input[type=range] { width: 100%; margin: 0.75rem 0; accent-color: var(--pc-accent); }
.pc__crop-actions { display: flex; justify-content: flex-end; gap: 0.5rem; }
.pc__tiers { margin: 0; padding-left: 1.1rem; font-size: 0.9em; opacity: 0.85; }
.pc__summary-box { margin-top: 1rem; padding: 0.75rem 0.9rem; border: 1px solid var(--pc-border); border-radius: 8px; display: grid; gap: 0.3rem; font-size: 0.95em; }
.pc__summary-box[hidden] { display: none; }
.pc__sum-title { font-weight: 600; }
.pc__sum-row { display: flex; justify-content: space-between; gap: 1rem; }
.pc__sum-total { border-top: 1px solid var(--pc-border); padding-top: 0.35rem; margin-top: 0.2rem; font-weight: 600; }

/* ---- image cards (photo + name) ---- */
.pc__card-wrap { position: relative; min-width: 0; }
.pc__card { display: flex; flex-direction: column; height: 100%; box-sizing: border-box; border: 1px solid var(--pc-border); border-radius: 6px; background: var(--pc-card-bg, #fff); cursor: pointer; overflow: hidden; transition: border-color 0.15s, box-shadow 0.15s; }
.pc__card:hover { border-color: rgba(127, 127, 127, 0.7); }
.pc__card-img { display: block; width: 100%; aspect-ratio: 1 / 1; background: #eee center / cover no-repeat; }
.pc__card-text { display: block; padding: 0.4rem 0.35rem 0.5rem; font-size: 0.8em; line-height: 1.3; text-align: center; color: inherit; opacity: 0.85; overflow-wrap: anywhere; }
.pc__choice-input:checked + .pc__card { border: 2px solid var(--pc-selected, #3fae4c); box-shadow: 0 0 0 1px var(--pc-selected, #3fae4c) inset; }
.pc__choice-input:checked + .pc__card .pc__card-text { opacity: 1; }
.pc__choice-input:checked + .pc__card::after { content: ""; position: absolute; top: -4px; right: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--pc-selected, #3fae4c); border: 2px solid #fff; }
.pc__choice-input:focus-visible + .pc__card { outline: 2px solid var(--pc-selected, #3fae4c); outline-offset: 2px; }
.pc__card-zoom { position: absolute; top: 4px; left: 4px; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 3px; background: rgba(60, 60, 60, 0.7) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='1.6'%3E%3Ccircle cx='7' cy='7' r='4.2'/%3E%3Cpath d='M10.2 10.2 13.5 13.5'/%3E%3C/svg%3E") center / 12px no-repeat; cursor: zoom-in; opacity: 0.85; }
.pc__card-zoom:hover, .pc__card-zoom:focus-visible { opacity: 1; }
.pc__zoom { max-width: min(46rem, calc(100vw - 32px)); }
.pc__zoom-img { display: block; width: 100%; height: auto; border-radius: 6px; }
.pc__current { font-weight: 400; opacity: 0.65; }
@media (max-width: 420px) { .pc__card-text { font-size: 0.72em; } }

/* settings toggles */
.pc--no-current .pc__current { display: none; }
.pc--no-required .pc__req { display: none; }
.pc--one-column .pc__field--radio .pc__values, .pc--one-column .pc__field--checkbox .pc__values { display: flex; flex-direction: column; }
[data-val][hidden] { display: none !important; }

/* ---- v3: layout options ---- */
.pc__set { display: flex; flex-wrap: wrap; gap: 1rem; }
.pc__set > * { flex: 1 1 100%; min-width: 0; }
.pc__set > .pc__field--w, .pc__group-body > .pc__field--w { flex: 0 0 calc(var(--pc-w, 100) * 1% - 1rem * (100 - var(--pc-w, 100)) / 100); }
@media (max-width: 640px) { .pc__set > .pc__field--w, .pc__group-body > .pc__field--w { flex-basis: calc(var(--pc-mw, 100) * 1% - 1rem * (100 - var(--pc-mw, 100)) / 100); } }
.pc__group-body { display: flex; flex-wrap: wrap; gap: 1rem; }
.pc__group-body > * { flex: 1 1 100%; min-width: 0; }
.pc__field--nolabel > .pc__label, .pc__field--nolabel .pc__group > legend.pc__label { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pc__field--novaltext .pc__card-text { display: none; }
.pc__values--grid { display: grid; grid-template-columns: repeat(var(--pc-cols, 3), minmax(0, 1fr)); }
@media (max-width: 640px) { .pc__values--grid { grid-template-columns: repeat(var(--pc-mcols, var(--pc-cols, 3)), minmax(0, 1fr)); } }
.pc__values--x { display: flex; flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 0.25rem; }
.pc__values--x > * { flex: 0 0 auto; scroll-snap-align: start; }
.pc__values--x .pc__card-wrap { width: var(--pc-img, 8rem); }
.pc__card-img { height: var(--pc-img, auto); border-radius: var(--pc-rad, 0); }
.pc__field[style*="--pc-img"] .pc__card-img { aspect-ratio: auto; }
.pc__field[style*="--pc-img"] .pc__swatch { width: var(--pc-img); height: var(--pc-img); }
.pc__field[style*="--pc-rad"] .pc__swatch, .pc__field[style*="--pc-rad"] .pc__swatch-fill { border-radius: var(--pc-rad); }
.pc__choice-input:disabled + label, .pc__choice-input:disabled + .pc__card { opacity: 0.45; cursor: not-allowed; }
.pc__vprice { opacity: 0.85; }
.pc__vwas { opacity: 0.6; margin-left: 0.15em; }
.pc__vlink { margin-left: 0.3em; text-decoration: none; font-size: 0.9em; }
.pc__ptrig { display: inline-flex; align-items: center; gap: 0.3em; margin-left: 0.5em; padding: 0; border: 0; background: none; font: inherit; font-weight: 400; text-decoration: underline; cursor: pointer; color: inherit; vertical-align: middle; }
.pc__ptrig img { display: block; width: auto; }

/* ---- v4: settings-driven pieces ---- */
.pc__drop { display: grid; justify-items: center; gap: 0.15rem; padding: 1rem; border: 2px dashed #cccccc; border-radius: 8px; cursor: pointer; text-align: center; color: #6d7175; }
.pc__drop.over { border-color: var(--pc-selected, #3fae4c); }
.pc__drop.full { opacity: 0.5; cursor: not-allowed; }
.pc__drop-btn { display: inline-block; padding: 0.15rem 0.5rem; border-radius: 4px; background: #e5effd; color: #1f5199; font-weight: 600; font-size: 0.9em; }
.pc__drop-sub { font-size: 0.85em; }
.pc__tiers-t { display: grid; gap: 0.35rem; font-size: 0.9em; }
.pc__tiers-t table, .pc__confirm-t { border-collapse: collapse; width: 100%; }
.pc__tiers-t th, .pc__tiers-t td, .pc__confirm-t th, .pc__confirm-t td { border: 1px solid var(--pc-border); padding: 0.3rem 0.5rem; text-align: left; }
.pc__confirm .pc__crop-actions { margin-top: 0.75rem; }
.pc__confirm .pc__sum-total { margin-top: 0.5rem; }
.pc--cond-off { opacity: 0.45; }
.pc--novaltext .pc__card-text { display: none; }

/* Hover popup for option values */
.pc__vpop { position: fixed; z-index: 2147483000; width: min(300px, calc(100vw - 16px)); padding: 10px; background: #fff; color: #222; border: 1px solid rgba(0, 0, 0, 0.18); border-radius: 6px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16); pointer-events: auto; font-size: 14px; line-height: 1.45; }
.pc__vpop[hidden] { display: none; }
.pc__vpop-img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 3px; background: #f3f3f3; }
.pc__vpop-title { margin-top: 8px; font-size: 15px; font-weight: 500; }
.pc__vpop-price { white-space: nowrap; }
.pc__vpop-desc { margin: 6px 0 0; font-size: 12.5px; color: #555; white-space: pre-line; }
.pc__swatch, .pc__card, .pc__btn, .pc__check { -webkit-touch-callout: none; }

/* Double-click / double-tap to enlarge: stop the browser zooming the page on double-tap */
.pc--dblzoom { touch-action: manipulation; user-select: none; -webkit-user-select: none; }

.pc__embed-off{display:flex;flex-direction:column;gap:4px;margin:0 0 14px;padding:12px 14px;border:1px solid #e0b252;border-left:4px solid #d99a1e;border-radius:8px;background:#fff6e0;color:#5c4400;font-family:system-ui,-apple-system,"Segoe UI",sans-serif;font-size:13px;line-height:1.45}
.pc__embed-off strong{font-size:14px;color:#3d2d00}
.pc__embed-off small{font-size:12px;opacity:.75}
