:root {
  --customall-ink: #18181b;
  --customall-muted: #64748b;
  --customall-line: #e2e8f0;
  --customall-soft: #f8fafc;
  --customall-accent: #4f46e5;
  --customall-focus: #2563eb;
}

body.customall-has-preview #ca-personalize-slot {
  grid-column: 1 / -1;
  margin: 1rem 0 1.15rem;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

body.customall-has-preview .sdt-pdp-buy {
  position: static;
  top: auto;
  align-self: start;
}

body.customall-has-preview form.variations_form select.sdt-select-native {
  position: absolute !important;
  left: 0 !important;
  width: 1px !important;
  min-width: 1px !important;
  max-width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

body.customall-layout--preview_wide .sdt-pdp-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(410px, .8fr);
}

#customall-preview {
  display: block;
  margin: 0;
  color: var(--customall-ink);
}

.customall-loading,
.customall-error {
  display: grid;
  min-height: 116px;
  place-items: center;
  gap: .55rem;
  padding: 1rem;
  color: var(--customall-muted);
  background: var(--customall-soft);
  border: 1px solid var(--customall-line);
  border-radius: 14px;
  text-align: center;
}

.customall-loading span {
  width: 26px;
  height: 26px;
  border: 3px solid #c7d2fe;
  border-top-color: var(--customall-accent);
  border-radius: 50%;
  animation: customall-spin .8s linear infinite;
}

.customall-loading strong,
.customall-error strong { font-size: .82rem; }
.customall-error span { font-size: .76rem; }

.customall-fields {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--customall-line);
  border-radius: 16px;
}

.customall-fields-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.05rem;
  color: #fff;
  background: var(--customall-ink);
}

.customall-fields-heading small {
  display: block;
  margin-bottom: .2rem;
  color: #a5b4fc;
  font-size: .61rem;
  font-weight: 800;
  letter-spacing: .11em;
}

.customall-fields-heading h3 {
  margin: 0;
  color: #fff;
  font-size: 1rem;
  line-height: 1.25;
}

.customall-progress {
  flex: 0 0 auto;
  padding: .38rem .52rem;
  color: #e2e8f0;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  font-size: .66rem;
  font-weight: 750;
}

.customall-field-list { padding: 0 1.05rem; }

.customall-field {
  min-width: 0;
  margin: 0;
  padding: 1rem 0;
  border: 0;
  border-bottom: 1px solid var(--customall-line);
}

.customall-field:last-child { border-bottom: 0; }
.customall-field legend {
  width: 100%;
  margin: 0 0 .65rem;
  padding: 0;
  color: var(--customall-ink);
  font-size: .84rem;
  font-weight: 800;
}
.customall-field legend span { color: #dc2626; }

.customall-choice-grid {
  display: grid;
  grid-template-columns: repeat(var(--customall-option-columns, 5), minmax(0, 1fr));
  gap: .55rem;
}

.customall-choice-grid--text {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}

.customall-choice-grid--text .customall-choice {
  flex: 0 1 auto;
  width: auto;
  min-width: 76px;
  max-width: 100%;
  min-height: 48px;
  aspect-ratio: auto;
  padding: .65rem .9rem;
}

.customall-choice {
  position: relative;
  display: flex;
  aspect-ratio: 1 / 1;
  min-width: 0;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: .35rem;
  color: var(--customall-ink);
  background: var(--customall-soft);
  border: 1px solid var(--customall-line);
  border-radius: 11px;
  cursor: pointer;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.customall-choice:hover { background: #fff; border-color: #94a3b8; }
.customall-choice:focus-visible { outline: 0; border-color: var(--customall-focus); box-shadow: 0 0 0 3px rgba(37,99,235,.2); }
.customall-choice[aria-pressed="true"] { background: #eef2ff; border-color: var(--customall-accent); box-shadow: inset 0 0 0 1px var(--customall-accent); }
.customall-choice img { display: block; width: 100%; height: 100%; object-fit: contain; }
.customall-choice > span { overflow: hidden; font-size: .72rem; font-weight: 750; line-height: 1.2; text-align: center; text-overflow: ellipsis; }
.customall-choice > b {
  position: absolute;
  right: 3px;
  bottom: 3px;
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--customall-accent);
  border: 2px solid #fff;
  border-radius: 50%;
  font-size: .58rem;
}
.customall-swatch { width: 72%; height: 72%; border: 1px solid rgba(15,23,42,.12); border-radius: 50%; }

.customall-field select,
.customall-text-wrap input {
  width: 100%;
  min-height: 48px;
  padding: .68rem .78rem;
  color: var(--customall-ink);
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font: inherit;
  font-size: .87rem;
}
.customall-field select:focus,
.customall-text-wrap input:focus { outline: 0; border-color: var(--customall-focus); box-shadow: 0 0 0 3px rgba(37,99,235,.16); }
.customall-text-wrap { position: relative; }
.customall-text-wrap input { padding-right: 4rem; }
.customall-text-wrap > span { position: absolute; top: 50%; right: .7rem; color: #94a3b8; font-size: .7rem; transform: translateY(-50%); }
.customall-help { margin: .45rem 0 0; color: var(--customall-muted); font-size: .72rem; line-height: 1.5; }

.customall-gallery { min-width: 0; }
.customall-gallery.customall-gallery--sticky { position: sticky; top: 94px; align-self: start; }
.customall-gallery > .woocommerce-product-gallery { display: none !important; }

.customall-preview-surface {
  overflow: hidden;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(15,23,42,.09);
}
.customall-media-viewport { position: relative; width: min(100%, calc((100vh - 190px) * var(--customall-artwork-ratio, 1))); overflow: hidden; margin-inline: auto; background: #f1f5f9; }
.customall-preview-canvas,
.customall-product-photo { position: absolute; inset: 0; width: 100%; height: 100%; }
.customall-preview-canvas { display: block; overflow: hidden; background: #f1f5f9; }
.customall-preview-canvas[hidden],
.customall-product-photo[hidden] { display: none !important; }
.customall-product-photo { object-fit: cover; background: #f1f5f9; }
.customall-stage { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; background: #fff; }
.customall-stage .konvajs-content { width: 100% !important; height: 100% !important; }
.customall-stage canvas { width: 100% !important; height: 100% !important; }
.customall-render-snapshot { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; object-fit: fill; opacity: 1; transition: opacity 160ms ease; }
.customall-render-snapshot.is-fading { opacity: 0; }
.customall-rendering-status {
  position: absolute;
  top: .75rem;
  right: .75rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .45rem .62rem;
  color: #334155;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(226,232,240,.92);
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(15,23,42,.12);
  font-size: .68rem;
  font-weight: 750;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 160ms ease, transform 160ms ease;
}
.customall-rendering-status i { width: 13px; height: 13px; border: 2px solid #cbd5e1; border-top-color: var(--customall-accent); border-radius: 50%; animation: customall-spin .7s linear infinite; }
.customall-preview-surface.is-rendering .customall-rendering-status { opacity: 1; transform: translateY(0); }
.customall-media-thumbnails {
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  padding: .65rem;
  background: #fff;
  border-top: 1px solid var(--customall-line);
  scrollbar-width: thin;
  overscroll-behavior-inline: contain;
}
.customall-media-thumbnail {
  position: relative;
  flex: 0 0 64px;
  width: 64px;
  aspect-ratio: 1;
  overflow: hidden;
  padding: 0;
  background: #fff;
  border: 2px solid transparent;
  border-radius: 9px;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.customall-media-thumbnail:hover { border-color: #cbd5e1; }
.customall-media-thumbnail:focus-visible { outline: 0; box-shadow: 0 0 0 3px rgba(37,99,235,.22); }
.customall-media-thumbnail.is-active { border-color: var(--customall-accent); box-shadow: 0 0 0 1px var(--customall-accent); }
.customall-media-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.customall-media-thumbnail--preview span { position: absolute; inset: auto 3px 3px; padding: 2px 3px; color: #fff; background: rgba(15,23,42,.78); border-radius: 4px; font-size: .55rem; font-weight: 800; line-height: 1.15; }

.customall-options--compact .customall-field-list { display: grid; gap: .8rem; padding-block: 1rem; }
.customall-options--compact .customall-field { padding: 0; border: 0; }

@media (max-width: 1099px) {
  body.customall-layout--preview_wide .sdt-pdp-grid { grid-template-columns: 1fr; }
  .customall-gallery.customall-gallery--sticky { position: static; }
  .customall-media-viewport { width: 100%; }
}

@media (max-width: 767px) {
  .customall-media-thumbnail { flex-basis: 58px; width: 58px; }
  .customall-choice-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .customall-choice-grid--text .customall-choice { min-width: 72px; }
  .customall-fields-heading { align-items: flex-start; flex-direction: column; }
  .customall-progress { align-self: flex-start; }
}

@media (max-width: 440px) {
  .customall-choice-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .customall-choice,
  .customall-media-thumbnail,
  .customall-render-snapshot,
  .customall-rendering-status { transition: none; }
  .customall-loading span,
  .customall-rendering-status i { animation: none; }
}

@keyframes customall-spin { to { transform: rotate(360deg); } }
