:root {
  --jgpc-bg: #ffffff;
  --jgpc-surface: #ffffff;
  --jgpc-surface-2: #fafafa;
  --jgpc-surface-soft: #f3e8ff;
  --jgpc-text: #09090b;
  --jgpc-muted: #52525b;
  --jgpc-border: #e4e4e7;
  --jgpc-accent: #7c3aed;
  --jgpc-accent-dark: #4c1d95;
  --jgpc-ink: #09090b;
  --jgpc-ok-bg: #ecfdf3;
  --jgpc-ok-text: #166534;
  --jgpc-bad-bg: #fef2f2;
  --jgpc-bad-text: #b91c1c;
}

.jgpc-builder {
  width: min(100%, 1380px);
  margin: 16px auto 28px;
  color: var(--jgpc-text);
  box-sizing: border-box;
}

.jgpc-builder__grid {
  display: grid;
  gap: 14px;
  align-items: start;
  width: 100%;
  margin-inline: auto;
}

.jgpc-builder__panel,
.jgpc-preview-shell {
  background: var(--jgpc-surface);
  border: 1px solid var(--jgpc-border);
  border-radius: 24px;
  box-shadow: 0 16px 40px rgba(9, 9, 11, 0.07);
  box-sizing: border-box;
}

.jgpc-preview-shell {
  padding: 10px;
  min-width: 0;
  width: 100%;
}

.jgpc-builder__panel {
  padding: 16px;
  min-width: 0;
}

.jgpc-summary {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.jgpc-eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--jgpc-accent);
}

.jgpc-title {
  margin: 0;
  font-size: clamp(26px, 7vw, 36px);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--jgpc-text);
}

.jgpc-summary__topline {
  display: grid;
  gap: 8px;
}

.jgpc-price,
.jgpc-mobile-buybar__price {
  font-size: clamp(20px, 5vw, 28px);
  font-weight: 900;
  color: var(--jgpc-accent-dark);
}

.jgpc-summary__micro,
.jgpc-instructions,
.jgpc-step__copy p,
.jgpc-preview-note,
.jgpc-live-product-card__copy span,
.jgpc-file-name {
  margin: 0;
  color: var(--jgpc-muted);
  font-size: 13px;
  line-height: 1.45;
}

.jgpc-summary__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.jgpc-summary-chip,
.jgpc-summary__stock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: var(--jgpc-surface-soft);
  color: var(--jgpc-accent-dark);
  border: 1px solid #dcc7ff;
}

.jgpc-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.jgpc-preview-head__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.jgpc-preview-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--jgpc-surface-soft);
  border: 1px solid #dcc7ff;
  color: var(--jgpc-accent-dark);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.jgpc-preview-expand {
  min-height: 34px;
  border: 1px solid var(--jgpc-border);
  border-radius: 999px;
  background: #fff;
  color: var(--jgpc-text);
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.jgpc-stage-wrap {
  margin-top: 10px;
  padding: 8px;
  border: 1px solid var(--jgpc-border);
  border-radius: 20px;
  background: linear-gradient(180deg, #faf5ff 0%, #ffffff 100%);
}

.jgpc-live-product-card {
  display: none;
}

.jgpc-stage {
  position: relative;
  width: min(100%, 220px);
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(180deg, #fafafa 0%, #f4f4f5 100%);
  border: 1px solid var(--jgpc-border);
}

.jgpc-stage__placeholder {
  display: grid;
  place-items: center;
  min-height: 200px;
  padding: 18px;
  text-align: center;
  color: var(--jgpc-muted);
}

.jgpc-base-image,
.jgpc-overlay-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.jgpc-print-area {
  position: absolute;
  overflow: hidden;
  border: 2px dashed rgba(124, 58, 237, 0.5);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
  z-index: 2;
  transition: background-color 0.15s ease;
}

.jgpc-design-canvas,
.jgpc-print-area__grid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.jgpc-design-canvas {
  cursor: grab;
  touch-action: none;
  z-index: 2;
}

.jgpc-design-canvas:active {
  cursor: grabbing;
}

.jgpc-print-area__grid {
  pointer-events: none;
  z-index: 3;
  background-image: linear-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.18) 1px, transparent 1px);
  background-size: 24px 24px;
}

.jgpc-overlay-image {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.jgpc-form {
  display: grid;
  gap: 14px;
}

.jgpc-step,
.jgpc-section,
.jgpc-active-layer-bar {
  border: 1px solid var(--jgpc-border);
  border-radius: 20px;
  background: #fff;
}

.jgpc-step {
  padding: 14px;
}

.jgpc-step__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.jgpc-step__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--jgpc-accent);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  flex: 0 0 auto;
}

.jgpc-step__copy {
  display: grid;
  gap: 4px;
}

.jgpc-step__copy h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.1;
  color: var(--jgpc-text);
}

.jgpc-form__group {
  display: grid;
  gap: 8px;
}

.jgpc-form label {
  font-size: 13px;
  font-weight: 800;
  color: var(--jgpc-text);
}

.jgpc-form select,
.jgpc-form input[type="text"],
.jgpc-form input[type="number"],
.jgpc-form input[type="range"] {
  width: 100%;
}

.jgpc-form select,
.jgpc-form input[type="text"],
.jgpc-form input[type="number"],
.jgpc-search-input {
  min-height: 48px;
  border: 1px solid var(--jgpc-border);
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff;
  color: var(--jgpc-text);
}

.jgpc-selector-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.jgpc-selector-block {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.jgpc-selector-block--brand,
.jgpc-selector-block--stock {
  grid-column: span 2;
}

.jgpc-stock-wrap {
  align-self: end;
}

.jgpc-stock-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  width: fit-content;
  font-size: 12px;
  font-weight: 800;
  background: var(--jgpc-surface-soft);
  border: 1px solid #dcc7ff;
  color: var(--jgpc-accent-dark);
}

.jgpc-stock-badge.is-ok {
  background: var(--jgpc-ok-bg);
  color: var(--jgpc-ok-text);
  border-color: #bbf7d0;
}

.jgpc-stock-badge.is-bad {
  background: var(--jgpc-bad-bg);
  color: var(--jgpc-bad-text);
  border-color: #fecaca;
}

.jgpc-search-group {
  margin-top: 4px;
}

.jgpc-section {
  overflow: hidden;
}

.jgpc-section > summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
  font-weight: 800;
}

.jgpc-section > summary::-webkit-details-marker {
  display: none;
}

.jgpc-section__title {
  flex: 1;
  font-size: 15px;
}

.jgpc-section > summary::after {
  content: '+';
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--jgpc-surface-soft);
  border: 1px solid #dcc7ff;
  color: var(--jgpc-accent-dark);
  font-weight: 900;
  flex: 0 0 auto;
}

.jgpc-section[open] > summary::after {
  content: '–';
}

.jgpc-section__body {
  padding: 0 12px 12px;
}

.jgpc-upload {
  position: relative;
  padding: 18px 14px;
  border: 2px dashed #c4b5fd;
  border-radius: 18px;
  background: linear-gradient(180deg, #faf5ff 0%, #ffffff 100%);
  cursor: pointer;
}

.jgpc-upload:hover,
.jgpc-upload.is-dragover {
  border-color: var(--jgpc-accent);
  background: #f8f1ff;
}

.jgpc-upload__content {
  text-align: center;
}

.jgpc-upload__content strong,
.jgpc-upload__content span,
.jgpc-upload__content small {
  display: block;
}

.jgpc-upload__content strong {
  margin-bottom: 6px;
  font-size: 17px;
}

.jgpc-upload__content small {
  margin-top: 8px;
  color: var(--jgpc-muted);
}

.jgpc-file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.jgpc-upload__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.jgpc-editor-toolbar,
.jgpc-text-tools {
  border: 1px solid var(--jgpc-border);
  border-radius: 18px;
  padding: 12px;
  background: #fafafa;
}

.jgpc-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.jgpc-row--secondary {
  margin-top: 8px;
}

.jgpc-zoom-row {
  grid-template-columns: 1fr;
  gap: 6px;
  align-items: center;
  margin-top: 10px;
}

.jgpc-tool-btn,
.jgpc-preview-expand {
  appearance: none;
}

.jgpc-tool-btn {
  min-height: 42px;
  border: 1px solid var(--jgpc-border);
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 800;
  color: var(--jgpc-ink);
  cursor: pointer;
}

.jgpc-tool-btn:hover,
.jgpc-preview-expand:hover,
.jgpc-submit:hover {
  filter: brightness(0.98);
}

.jgpc-tool-btn:hover,
.jgpc-tool-btn:focus-visible,
.jgpc-preview-expand:focus-visible,
.jgpc-form select:focus,
.jgpc-form input[type="text"]:focus,
.jgpc-form input[type="number"]:focus,
.jgpc-search-input:focus {
  outline: none;
  border-color: #a78bfa;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.jgpc-add-image-btn {
  white-space: nowrap;
}

.jgpc-zoom-value {
  font-size: 12px;
  font-weight: 900;
  color: var(--jgpc-accent-dark);
}

.jgpc-text-tools__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.jgpc-text-tools__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: center;
}

.jgpc-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
}

.jgpc-check input {
  width: auto;
}

.jgpc-background-tools__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px;
  gap: 12px;
  align-items: center;
}

.jgpc-active-layer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  font-size: 13px;
  background: var(--jgpc-surface-soft);
}

.jgpc-active-layer-bar__label {
  color: var(--jgpc-muted);
  font-weight: 700;
}

.jgpc-active-layer-bar__value {
  color: var(--jgpc-text);
  font-weight: 800;
}

.jgpc-active-layer-bar.is-empty {
  opacity: 0.84;
}

.jgpc-layers {
  display: grid;
  gap: 8px;
}

.jgpc-layer-item,
.jgpc-layer-empty {
  width: 100%;
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid var(--jgpc-border);
  background: #fff;
  padding: 9px 10px;
  text-align: left;
  font-size: 12px;
}

.jgpc-layer-item {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.jgpc-layer-item.is-active {
  border-color: #a78bfa;
  background: var(--jgpc-surface-soft);
  color: var(--jgpc-accent-dark);
  font-weight: 800;
}

.jgpc-layer-empty {
  color: var(--jgpc-muted);
}

.jgpc-file-thumbs {
  display: grid;
  gap: 8px;
}

.jgpc-file-thumb {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--jgpc-border);
  border-radius: 14px;
  padding: 8px 10px;
}

.jgpc-file-thumb__index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--jgpc-surface-soft);
  color: var(--jgpc-accent-dark);
  font-weight: 900;
  font-size: 12px;
}

.jgpc-file-thumb__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.jgpc-file-thumb__remove {
  appearance: none;
  border: 1px solid #d8b4fe;
  background: var(--jgpc-surface-soft);
  color: var(--jgpc-accent-dark);
  width: 28px;
  height: 28px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.jgpc-form__actions {
  position: sticky;
  bottom: 0;
  z-index: 15;
  margin: 0 -16px -16px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.95) 24%, rgba(255, 255, 255, 1) 100%);
  backdrop-filter: blur(10px);
}

.jgpc-mobile-buybar {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 20px;
  border: 1px solid var(--jgpc-border);
  background: #fff;
  box-shadow: 0 16px 36px rgba(76, 29, 149, 0.14);
}

.jgpc-mobile-buybar__meta {
  display: grid;
  gap: 4px;
}

.jgpc-mobile-buybar__variant,
.jgpc-mobile-buybar__stock {
  color: var(--jgpc-muted);
  font-size: 12px;
  font-weight: 700;
}

.jgpc-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(180deg, var(--jgpc-accent) 0%, var(--jgpc-accent-dark) 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  padding: 14px 18px;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(76, 29, 149, 0.28);
}

.jgpc-submit.is-disabled,
.jgpc-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.jgpc-preview-modal[hidden] {
  display: none !important;
}

.jgpc-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.jgpc-preview-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 9, 11, 0.78);
  backdrop-filter: blur(3px);
}

.jgpc-preview-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(92vw, 640px);
  margin: 5vh auto 0;
  padding: 14px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(9, 9, 11, 0.35);
}

.jgpc-preview-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(9, 9, 11, 0.88);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.jgpc-preview-modal__image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  background: #fff;
}

body.jgpc-modal-open {
  overflow: hidden;
}

.jgpc-error {
  padding: 14px 16px;
  border-radius: 12px;
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

@media (max-width: 767px) {
  .jgpc-builder {
    margin: 12px auto 24px;
  }

  .jgpc-preview-shell {
    position: static;
    top: auto;
    z-index: auto;
    padding: 8px;
    max-height: min(220px, 40vh);
    overflow: visible;
  }

  .jgpc-summary {
    gap: 6px;
    margin-bottom: 8px;
  }

  .jgpc-eyebrow {
    font-size: 10px;
    letter-spacing: 0.1em;
  }

  .jgpc-title {
    font-size: clamp(22px, 6vw, 26px);
    line-height: 1.08;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .jgpc-summary__topline {
    gap: 6px;
  }

  .jgpc-price,
  .jgpc-mobile-buybar__price {
    font-size: 22px;
  }

  .jgpc-summary__micro {
    font-size: 12px;
    line-height: 1.3;
  }

  .jgpc-summary__chips {
    gap: 6px;
  }

  .jgpc-summary-chip,
  .jgpc-summary__stock {
    min-height: 28px;
    padding: 5px 9px;
    font-size: 11px;
  }

  .jgpc-preview-head {
    gap: 8px;
  }

  .jgpc-preview-badge {
    min-height: 24px;
    padding: 4px 8px;
    font-size: 10px;
  }

  .jgpc-preview-expand {
    min-height: 28px;
    padding: 5px 10px;
    font-size: 11px;
  }

  .jgpc-stage-wrap {
    margin-top: 8px;
    padding: 4px;
    position: sticky;
    top: 8px;
    z-index: 8;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.95) 100%);
    max-height: min(180px, 40vh);
    overflow: hidden;
  }

  .jgpc-stage {
    width: min(100%, 150px);
    max-height: min(150px, 28vh);
  }

  .jgpc-preview-note {
    margin-top: 6px;
    font-size: 11px;
    line-height: 1.25;
  }
}

@media (min-width: 768px) {
  .jgpc-builder {
    width: min(100%, 1480px);
    max-width: 1480px;
    margin: 24px auto 36px;
  }

  .jgpc-builder__grid {
    grid-template-areas: "panel preview";
    grid-template-columns: minmax(360px, 460px) minmax(640px, 860px);
    gap: 40px;
    align-items: start;
    justify-content: center;
  }

  .jgpc-builder__grid > * {
    min-width: 0;
    max-width: 100%;
  }

  .jgpc-preview-shell {
    grid-area: preview;
    grid-column: 2;
    order: 2;
    position: sticky;
    top: 16px;
    padding: 16px;
    align-self: start;
    width: 100%;
    max-width: 860px;
    overflow: hidden;
  }

  .jgpc-builder__panel {
    grid-area: panel;
    grid-column: 1;
    order: 1;
    padding: 20px;
    width: 100%;
    max-width: 460px;
  }

  .jgpc-summary {
    gap: 12px;
  }

  .jgpc-summary__topline {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
  }

  .jgpc-stage {
    width: min(100%, 560px);
    max-height: none;
  }

  .jgpc-live-product-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: center;
    margin-bottom: 12px;
    padding: 12px 14px;
    border: 1px solid var(--jgpc-border);
    border-radius: 18px;
    background: #fff;
  }

  .jgpc-live-product-card__copy {
    display: grid;
    gap: 4px;
  }

  .jgpc-live-product-card__copy strong {
    font-size: 14px;
  }

  .jgpc-live-product-image {
    width: 82px;
    height: 82px;
    object-fit: contain;
    border-radius: 16px;
    background: #fff;
    border: 1px solid var(--jgpc-border);
  }

  .jgpc-selector-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .jgpc-selector-block--brand {
    grid-column: span 2;
  }

  .jgpc-selector-block--stock {
    grid-column: span 1;
  }

  .jgpc-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .jgpc-row--secondary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .jgpc-zoom-row {
    grid-template-columns: 120px 1fr auto;
  }

  .jgpc-text-tools__grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .jgpc-form__actions {
    position: static;
    margin: 0;
    padding: 0;
    background: transparent;
    backdrop-filter: none;
  }

  .jgpc-mobile-buybar {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
    align-items: center;
    gap: 16px;
    padding: 16px;
  }

  .jgpc-mobile-buybar__meta {
    gap: 6px;
  }

  .jgpc-mobile-buybar__variant,
  .jgpc-mobile-buybar__stock {
    font-size: 13px;
  }

  .jgpc-submit {
    min-height: 58px;
    font-size: 17px;
  }
}
/* === FIX RESPONSIVE JGPC V1.1 === */

/* Mobile: header compacto, preview NO gigante */
@media (max-width: 767px) {
  .jgpc-builder {
    padding: 0 12px;
  }

  .jgpc-preview-shell {
    position: relative;
    max-height: none;
    overflow: visible;
    padding: 10px;
  }

  .jgpc-summary {
    padding: 0;
    margin-bottom: 10px;
  }

  .jgpc-title {
    font-size: 24px !important;
    line-height: 1.05;
  }

  .jgpc-price {
    font-size: 22px !important;
  }

  .jgpc-summary__chips {
    display: none;
  }

  .jgpc-stage-wrap {
    position: sticky;
    top: 0;
    z-index: 20;
    max-height: 190px;
    padding: 6px;
    margin-bottom: 12px;
    overflow: hidden;
    background: #fff;
  }

  .jgpc-stage {
    width: min(100%, 170px);
    max-height: 170px;
    margin: 0 auto;
  }

  .jgpc-live-product-card {
    display: none !important;
  }
}

/* Desktop: no activar 2 columnas tan temprano */
@media (min-width: 768px) and (max-width: 1099px) {
  .jgpc-builder__grid {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 20px;
  }

  .jgpc-builder__panel,
  .jgpc-preview-shell {
    max-width: 760px;
    width: 100%;
    margin: 0 auto;
  }

  .jgpc-preview-shell {
    position: relative;
    top: auto;
  }
}

/* Desktop real: 2 columnas limpias */
@media (min-width: 1100px) {
  .jgpc-builder {
    width: min(100%, 1280px);
    max-width: 1280px;
  }

  .jgpc-builder__grid {
    display: grid;
    grid-template-columns: minmax(360px, 480px) minmax(0, 1fr) !important;
    gap: 28px;
    align-items: start;
  }

  .jgpc-builder__panel {
    width: 100%;
    max-width: none;
    grid-column: 1;
  }

  .jgpc-preview-shell {
    width: 100%;
    max-width: none;
    grid-column: 2;
    position: sticky;
    top: 18px;
    overflow: hidden;
  }

  .jgpc-stage {
    width: min(100%, 520px);
  }
}

/* === USER LOCKED LAYOUT OVERRIDES === */

/* Botones */
.jgpc-row,
.jgpc-row--secondary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.jgpc-tool-btn {
  min-height: 44px;
  height: 44px;
  border-radius: 10px;
}

/* CTA */
.jgpc-form__actions {
  position: sticky;
  bottom: 0;
  z-index: 30;
  width: 100%;
}

.jgpc-submit {
  width: 100%;
  min-height: 50px;
  height: 50px;
  border-radius: 10px;
}

@media (max-width: 767px) {
  .jgpc-preview-shell {
    position: static;
    overflow: visible;
  }

  .jgpc-stage-wrap {
    position: sticky;
    top: 0;
    z-index: 20;
    max-height: 180px;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-inline: auto;
    overflow: hidden;
  }

  .jgpc-stage {
    width: 100%;
    max-width: 180px;
    max-height: 180px;
    margin: 0 auto;
  }

  .jgpc-base-image,
  .jgpc-overlay-image,
  .jgpc-live-product-image {
    object-fit: contain;
  }
}

@media (min-width: 768px) {
  .jgpc-builder__grid {
    grid-template-columns: 380px minmax(0, 1fr) !important;
    gap: 24px;
    align-items: start;
  }

  .jgpc-builder__panel {
    grid-column: 1;
    width: 380px;
    max-width: 380px;
  }

  .jgpc-preview-shell {
    grid-column: 2;
    position: sticky;
    top: 16px;
    width: 100%;
    max-width: none;
    overflow: visible;
  }

  .jgpc-stage-wrap {
    display: flex;
    justify-content: center;
  }

  .jgpc-base-image,
  .jgpc-overlay-image,
  .jgpc-live-product-image {
    object-fit: contain;
  }
}

/* === JGPC V2 CANVAS-FIRST OVERRIDES === */
.jgpc-panel-stack {
  display: grid;
  gap: 14px;
}

.jgpc-canvas-topbar,
.jgpc-canvas-bottomtools,
.jgpc-editor-toolbar--quick .jgpc-row,
.jgpc-editor-toolbar--quick .jgpc-row--secondary,
.jgpc-advanced-block .jgpc-row,
.jgpc-advanced-block .jgpc-row--secondary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.jgpc-tool-btn,
.jgpc-canvas-topbar__btn,
.jgpc-canvas-bottomtools .jgpc-tool-btn,
.jgpc-submit {
  min-height: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 10px;
}

.jgpc-step--quick-tools .jgpc-editor-toolbar,
.jgpc-section--advanced .jgpc-section__body,
.jgpc-section--upload .jgpc-section__body,
.jgpc-step--buy {
  overflow: visible;
}

.jgpc-editor-toolbar--quick .jgpc-row,
.jgpc-canvas-bottomtools {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.jgpc-advanced-stack {
  display: grid;
  gap: 14px;
}

.jgpc-advanced-block {
  display: grid;
  gap: 10px;
}

.jgpc-canvas-topbar,
.jgpc-canvas-bottomtools {
  background: #ffffff;
}

.jgpc-canvas-topbar {
  display: none;
}

.jgpc-canvas-bottomtools {
  display: none;
}

.jgpc-submit {
  width: 100%;
  min-height: 50px;
  height: 50px;
}

.jgpc-mobile-buybar {
  grid-template-columns: 1fr;
  gap: 12px;
}

.jgpc-mobile-buybar__meta {
  gap: 4px;
}

.jgpc-form__actions {
  width: 100%;
}

.jgpc-preview-shell {
  overflow: visible;
}

.jgpc-stage-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.jgpc-stage,
.jgpc-live-product-image,
.jgpc-base-image,
.jgpc-overlay-image {
  object-fit: contain;
}

@media (max-width: 767px) {
  .jgpc-builder {
    padding: 0 12px 88px;
  }

  .jgpc-builder__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .jgpc-preview-shell {
    display: grid;
    gap: 10px;
    position: relative;
    top: auto;
    padding: 0;
    background: transparent;
    box-shadow: none;
    border: 0;
  }

  .jgpc-summary,
  .jgpc-preview-head,
  .jgpc-live-product-card {
    display: none !important;
  }

  .jgpc-canvas-topbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    position: sticky;
    top: 0;
    z-index: 35;
    padding: 8px 0;
    background: #fff;
  }

  .jgpc-stage-wrap {
    position: sticky;
    top: 60px;
    z-index: 30;
    min-height: 35vh;
    max-height: 40vh;
    padding: 10px 12px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  }

  .jgpc-stage {
    width: min(100%, 240px);
    max-width: 240px;
    max-height: calc(40vh - 20px);
    margin: 0 auto;
  }

  .jgpc-canvas-bottomtools {
    display: grid;
    position: sticky;
    bottom: 62px;
    z-index: 34;
    padding: 8px 0 0;
  }

  .jgpc-builder__panel {
    width: 100%;
    max-width: none;
  }

  .jgpc-step--quick-tools {
    display: none;
  }

  .jgpc-form__actions {
    position: sticky;
    bottom: 0;
    z-index: 40;
    margin: 0 -12px;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.08);
  }

  .jgpc-mobile-buybar {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .jgpc-submit {
    width: 100%;
    min-height: 50px;
    height: 50px;
  }
}

@media (min-width: 768px) {
  .jgpc-builder {
    width: min(100%, 1280px);
    max-width: 1280px;
  }

  .jgpc-builder__grid {
    display: grid;
    grid-template-columns: 380px minmax(0, 1fr) !important;
    gap: 24px;
    align-items: start;
  }

  .jgpc-builder__panel {
    grid-column: 1;
    width: 380px;
    max-width: 380px;
    min-width: 380px;
  }

  .jgpc-preview-shell {
    grid-column: 2;
    display: grid;
    gap: 16px;
    position: sticky;
    top: 16px;
    align-self: start;
  }

  .jgpc-canvas-topbar {
    display: none;
  }

  .jgpc-canvas-bottomtools {
    display: none;
  }

  .jgpc-stage-wrap {
    position: sticky;
    top: 16px;
    padding: 16px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  }

  .jgpc-stage {
    width: min(100%, 560px);
    margin: 0 auto;
  }

  .jgpc-step--quick-tools {
    display: block;
  }

  .jgpc-section--advanced {
    display: block;
  }

  .jgpc-section--advanced:not([open]) .jgpc-section__body {
    display: none;
  }

  .jgpc-form__actions {
    position: static;
    margin: 0;
    padding: 0;
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
  }
}

/* === JGPC V2.1 SINGLE-SCREEN EDITOR === */
.jgpc-builder,
.jgpc-builder__grid,
.jgpc-builder__panel,
.jgpc-form {
  min-height: 0;
}

.jgpc-step__head p,
.jgpc-instructions,
.jgpc-preview-note,
.jgpc-summary__micro,
.jgpc-summary__chips {
  display: none !important;
}

.jgpc-step__head {
  gap: 10px;
  margin-bottom: 10px;
}

.jgpc-step__copy h3,
.jgpc-section__title,
.jgpc-advanced-block > label,
.jgpc-form__group > label {
  line-height: 1.2;
}

.jgpc-builder__panel {
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.jgpc-form {
  display: flex;
  flex-direction: column;
}

.jgpc-panel-stack {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.jgpc-step--variant,
.jgpc-section--upload,
.jgpc-step--quick-tools,
.jgpc-section--advanced,
.jgpc-step--buy,
.jgpc-active-layer-bar {
  margin: 0;
}

.jgpc-selector-grid,
.jgpc-text-tools__grid,
.jgpc-background-tools__grid {
  gap: 10px;
}

.jgpc-selector-block select,
.jgpc-search-input,
.jgpc-text-tools__grid input,
.jgpc-text-tools__grid select,
.jgpc-background-tools__grid input,
.jgpc-zoom-slider {
  min-height: 44px;
}

.jgpc-upload {
  min-height: 120px;
}

.jgpc-file-thumbs {
  max-height: 112px;
  overflow: auto;
}

.jgpc-layers {
  max-height: 180px;
  overflow: auto;
}

@media (max-width: 767px) {
  .jgpc-builder {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    padding: 0 12px 0;
  }

  .jgpc-builder__grid {
    min-height: 100dvh;
    max-height: 100dvh;
    grid-template-rows: auto auto 1fr;
    gap: 10px;
    overflow: hidden;
  }

  .jgpc-canvas-topbar {
    top: 0;
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .jgpc-stage-wrap {
    top: 56px;
    min-height: 36dvh;
    max-height: 38dvh;
  }

  .jgpc-stage {
    width: min(100%, 220px);
    max-width: 220px;
    max-height: calc(38dvh - 20px);
  }

  .jgpc-builder__panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: calc(100dvh - 56px - 38dvh - 84px);
    overflow: hidden;
    border-radius: 16px 16px 0 0;
    box-shadow: none;
    background: transparent;
  }

  .jgpc-form {
    min-height: 0;
    max-height: 100%;
  }

  .jgpc-panel-stack {
    gap: 10px;
    padding: 0 0 84px;
    max-height: 100%;
    overflow: auto;
  }

  .jgpc-step--variant,
  .jgpc-section--upload,
  .jgpc-step--quick-tools,
  .jgpc-section--advanced,
  .jgpc-active-layer-bar,
  .jgpc-step--buy {
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  }

  .jgpc-step--variant,
  .jgpc-step--quick-tools,
  .jgpc-active-layer-bar,
  .jgpc-step--buy {
    padding: 12px;
  }

  .jgpc-section--upload summary,
  .jgpc-section--advanced summary {
    padding: 12px;
  }

  .jgpc-section--upload .jgpc-section__body,
  .jgpc-section--advanced .jgpc-section__body {
    padding: 0 12px 12px;
  }

  .jgpc-step__number {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }

  .jgpc-step__copy h3 {
    font-size: 15px;
    margin: 0;
  }

  .jgpc-canvas-bottomtools {
    bottom: 66px;
    padding-top: 6px;
  }

  .jgpc-active-layer-bar {
    position: sticky;
    top: 0;
    z-index: 22;
  }

  .jgpc-step--quick-tools {
    display: none;
  }

  .jgpc-form__actions {
    margin: 0 -12px;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  }
}

@media (min-width: 768px) {
  .jgpc-builder {
    height: calc(100dvh - 24px);
    max-height: calc(100dvh - 24px);
    padding-bottom: 0;
  }

  .jgpc-builder__grid {
    min-height: calc(100dvh - 24px);
    max-height: calc(100dvh - 24px);
    overflow: hidden;
  }

  .jgpc-builder__panel {
    display: flex;
    flex-direction: column;
    height: calc(100dvh - 24px);
    max-height: calc(100dvh - 24px);
    padding: 14px;
    overflow: hidden;
  }

  .jgpc-form {
    height: 100%;
    max-height: 100%;
  }

  .jgpc-panel-stack {
    padding-right: 4px;
    padding-bottom: 0;
  }

  .jgpc-preview-shell {
    height: calc(100dvh - 24px);
    max-height: calc(100dvh - 24px);
    overflow: hidden;
  }

  .jgpc-summary {
    padding: 14px 16px;
    margin-bottom: 0;
  }

  .jgpc-summary__topline {
    margin: 0;
  }

  .jgpc-preview-head {
    padding: 0 4px;
  }

  .jgpc-stage-wrap {
    flex: 1 1 auto;
    min-height: 0;
    max-height: calc(100dvh - 170px);
  }

  .jgpc-stage {
    width: min(100%, 620px);
    max-height: calc(100dvh - 220px);
  }

  .jgpc-step--variant,
  .jgpc-step--quick-tools,
  .jgpc-active-layer-bar,
  .jgpc-step--buy {
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
  }

  .jgpc-section--upload,
  .jgpc-section--advanced {
    border-radius: 14px;
    background: #f8fafc;
  }

  .jgpc-step__number {
    width: 30px;
    height: 30px;
  }

  .jgpc-step--buy {
    margin-top: auto;
    padding-top: 8px;
    background: linear-gradient(180deg, rgba(255,255,255,0) 0%, #fff 22%);
  }

  .jgpc-mobile-buybar {
    position: sticky;
    bottom: 0;
    padding-top: 8px;
    background: #fff;
  }
}

/* === JGPC V2.2 INLINE EDITOR === */
.jgpc-preview-shell {
  position: relative;
}

.jgpc-stage-wrap {
  position: relative;
}

.jgpc-summary,
.jgpc-preview-head,
.jgpc-live-product-card,
.jgpc-active-layer-bar,
.jgpc-step--quick-tools {
  display: none !important;
}

.jgpc-inline-layer-ui {
  position: absolute;
  z-index: 36;
  pointer-events: none;
}

.jgpc-inline-layer-btn {
  position: absolute;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18);
  color: #111827;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.jgpc-inline-layer-btn--duplicate {
  top: -18px;
  left: -18px;
}

.jgpc-inline-layer-btn--delete {
  top: -18px;
  right: -18px;
}

.jgpc-inline-layer-btn--zoom-out {
  bottom: -18px;
  left: -18px;
}

.jgpc-inline-layer-btn--zoom-in {
  bottom: -18px;
  right: -18px;
}

.jgpc-inline-editor-bar {
  position: sticky;
  z-index: 35;
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 18px 18px 0 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.12);
}

.jgpc-inline-editor-mode {
  display: none;
  gap: 10px;
}

.jgpc-inline-editor-bar[data-active-type="none"] [data-inline-mode="none"],
.jgpc-inline-editor-bar[data-active-type="image"] [data-inline-mode="image"],
.jgpc-inline-editor-bar[data-active-type="text"] [data-inline-mode="text"] {
  display: grid;
}

.jgpc-inline-editor-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.jgpc-inline-editor-zoom {
  display: grid;
  grid-template-columns: 56px 1fr 54px;
  gap: 10px;
  align-items: center;
}

.jgpc-inline-editor-zoom label {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.jgpc-inline-editor-textrow {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 72px minmax(110px, 140px);
  gap: 8px;
  align-items: center;
}

.jgpc-inline-editor-textrow input[type="color"] {
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid #dbe3ef;
  background: #fff;
}

.jgpc-inline-editor-textrow input[type="text"],
.jgpc-inline-editor-textrow input[type="number"],
.jgpc-inline-editor-textrow select {
  min-height: 44px;
  height: 44px;
  border-radius: 12px;
}

.jgpc-inline-editor-bar .jgpc-tool-btn,
.jgpc-inline-editor-bar .jgpc-submit {
  min-height: 44px;
  height: 44px;
}

.jgpc-inline-editor-bar [data-inline-mode="none"] span {
  font-size: 13px;
  color: #64748b;
  text-align: center;
}

.jgpc-builder__panel {
  box-shadow: none;
}

.jgpc-panel-stack {
  gap: 12px;
}

.jgpc-section--upload,
.jgpc-section--advanced {
  display: none !important;
}

.jgpc-step--variant,
.jgpc-step--buy {
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.jgpc-step--variant {
  padding: 12px;
}

.jgpc-step--buy {
  padding: 12px;
}

.jgpc-step--variant .jgpc-step__head,
.jgpc-step--buy .jgpc-step__head {
  margin-bottom: 10px;
}

.jgpc-step--variant .jgpc-step__copy p,
.jgpc-step--buy .jgpc-step__copy p,
.jgpc-instructions,
.jgpc-search-group {
  display: none !important;
}

.jgpc-selector-grid {
  gap: 10px;
}

.jgpc-selector-block label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: #64748b;
}

.jgpc-selector-block select {
  min-height: 44px;
  border-radius: 12px;
}

@media (max-width: 767px) {
  .jgpc-builder {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    padding: 0 12px 0;
  }

  .jgpc-builder__grid {
    min-height: 100dvh;
    max-height: 100dvh;
    grid-template-rows: auto minmax(0, 1fr) auto 72px;
    gap: 8px;
    overflow: hidden;
  }

  .jgpc-canvas-topbar {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    position: sticky;
    top: 0;
    z-index: 38;
    padding: 8px 0 6px;
    background: #fff;
  }

  .jgpc-stage-wrap {
    top: 56px;
    min-height: 40dvh;
    max-height: 44dvh;
    padding: 10px 12px 56px;
    border-radius: 16px;
    background: #fff;
  }

  .jgpc-stage {
    width: min(100%, 250px);
    max-width: 250px;
    max-height: calc(44dvh - 70px);
  }

  .jgpc-inline-editor-bar {
    bottom: 62px;
    margin-top: -2px;
    padding: 10px 12px;
  }

  .jgpc-inline-editor-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .jgpc-inline-editor-textrow {
    grid-template-columns: 44px minmax(0, 1fr) 64px;
  }

  .jgpc-inline-editor-textrow select {
    grid-column: 1 / -1;
  }

  .jgpc-builder__panel {
    min-height: 0;
    max-height: none;
    overflow: hidden;
    background: transparent;
  }

  .jgpc-panel-stack {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    overflow: hidden;
    padding: 0;
  }

  .jgpc-step--variant {
    padding: 10px;
  }

  .jgpc-step--buy {
    display: contents;
  }

  .jgpc-step--buy .jgpc-step__head {
    display: none;
  }

  .jgpc-form__actions {
    position: sticky;
    bottom: 0;
    z-index: 40;
    margin: 0 -12px;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.98);
    box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.1);
  }

  .jgpc-mobile-buybar {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
}

@media (min-width: 768px) {
  .jgpc-builder {
    height: calc(100dvh - 24px);
    max-height: calc(100dvh - 24px);
  }

  .jgpc-builder__grid {
    grid-template-columns: 320px minmax(0, 1fr) !important;
    min-height: calc(100dvh - 24px);
    max-height: calc(100dvh - 24px);
    gap: 18px;
    overflow: hidden;
  }

  .jgpc-builder__panel {
    width: 320px;
    max-width: 320px;
    min-width: 320px;
    height: calc(100dvh - 24px);
    max-height: calc(100dvh - 24px);
    overflow: auto;
    padding: 0 0 12px;
    background: transparent;
  }

  .jgpc-canvas-topbar {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    position: static;
    padding: 0;
    background: transparent;
  }

  .jgpc-preview-shell {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 12px;
    height: calc(100dvh - 24px);
    max-height: calc(100dvh - 24px);
  }

  .jgpc-stage-wrap {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    padding: 16px 16px 70px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  }

  .jgpc-stage {
    width: min(100%, 620px);
    max-height: calc(100dvh - 220px);
  }

  .jgpc-inline-editor-bar {
    bottom: 0;
    padding: 12px 14px;
  }

  .jgpc-mobile-buybar {
    grid-template-columns: 1fr;
  }

  .jgpc-step--buy .jgpc-step__head {
    display: none;
  }
}

/* === JGPC V2.3 OPTION A: CLEAN PREMIUM EDITOR === */
:root {
  --jgpc-accent: #6d3df2;
  --jgpc-accent-strong: #5727db;
  --jgpc-accent-soft: rgba(109, 61, 242, 0.10);
  --jgpc-ink: #111827;
  --jgpc-muted: #64748b;
  --jgpc-line: #e7eaf1;
  --jgpc-surface: #ffffff;
  --jgpc-surface-alt: #f8fafc;
  --jgpc-shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
  --jgpc-shadow-float: 0 12px 24px rgba(15, 23, 42, 0.14);
}

.jgpc-builder {
  background: linear-gradient(180deg, #fcfcfe 0%, #f7f9fc 100%);
}

.jgpc-canvas-topbar {
  gap: 10px;
}

.jgpc-canvas-topbar .jgpc-tool-btn {
  min-height: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid var(--jgpc-line);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
  color: var(--jgpc-ink);
  font-weight: 700;
  letter-spacing: -.01em;
}

.jgpc-canvas-topbar .jgpc-tool-btn:hover,
.jgpc-canvas-topbar .jgpc-tool-btn:focus-visible {
  border-color: rgba(109, 61, 242, 0.35);
  box-shadow: 0 0 0 4px rgba(109, 61, 242, 0.08);
}

.jgpc-stage-wrap {
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.jgpc-stage {
  filter: drop-shadow(0 18px 24px rgba(15, 23, 42, 0.08));
}

.jgpc-inline-layer-ui {
  border: 2px solid rgba(109, 61, 242, 0.48);
  border-radius: 16px;
  box-shadow: 0 0 0 6px rgba(109, 61, 242, 0.08);
}

.jgpc-inline-layer-ui[data-layer-type="text"] {
  border-radius: 14px;
}

.jgpc-inline-layer-btn {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: var(--jgpc-shadow-float);
  color: var(--jgpc-ink);
  font-size: 17px;
}

.jgpc-inline-layer-btn:hover,
.jgpc-inline-layer-btn:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(109, 61, 242, 0.28);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.18);
}

.jgpc-inline-editor-bar {
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.09);
}

.jgpc-inline-editor-bar [data-inline-mode="none"] span {
  color: var(--jgpc-muted);
  font-size: 13px;
}

.jgpc-inline-editor-textrow input[type="text"],
.jgpc-inline-editor-textrow input[type="number"],
.jgpc-inline-editor-textrow select,
.jgpc-inline-editor-zoom input,
.jgpc-selector-block select {
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: #fff;
  color: var(--jgpc-ink);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}

.jgpc-inline-editor-textrow input[type="text"]:focus,
.jgpc-inline-editor-textrow input[type="number"]:focus,
.jgpc-inline-editor-textrow select:focus,
.jgpc-selector-block select:focus {
  outline: none;
  border-color: rgba(109, 61, 242, 0.45);
  box-shadow: 0 0 0 4px rgba(109, 61, 242, 0.08);
}

.jgpc-inline-editor-actions .jgpc-tool-btn {
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.24);
  color: var(--jgpc-ink);
  font-weight: 700;
}

.jgpc-inline-editor-actions .jgpc-tool-btn:hover,
.jgpc-inline-editor-actions .jgpc-tool-btn:focus-visible {
  border-color: rgba(109, 61, 242, 0.32);
  background: #fcfbff;
}

.jgpc-step--variant,
.jgpc-step--buy {
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.jgpc-step__number {
  background: linear-gradient(180deg, #7c4dff 0%, #5b2de1 100%);
  box-shadow: 0 8px 16px rgba(109, 61, 242, 0.18);
}

.jgpc-step__copy h3 {
  color: var(--jgpc-ink);
  font-weight: 700;
  letter-spacing: -.02em;
}

.jgpc-selector-block label {
  font-size: 11px;
  color: #5b708f;
  font-weight: 800;
}

.jgpc-stock-badge {
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid #bbf7d0;
  background: #ecfdf3;
  color: #067647;
  font-weight: 800;
}

.jgpc-mobile-buybar__price {
  color: var(--jgpc-accent-strong);
  font-weight: 800;
  letter-spacing: -.03em;
}

.jgpc-mobile-buybar__variant,
.jgpc-mobile-buybar__stock {
  color: var(--jgpc-muted);
}

.jgpc-submit {
  border: 0;
  background: linear-gradient(180deg, #7c4dff 0%, #5d2fe1 100%);
  color: #fff;
  font-weight: 800;
  letter-spacing: -.02em;
  box-shadow: 0 14px 24px rgba(93, 47, 225, 0.26);
}

.jgpc-submit:hover,
.jgpc-submit:focus-visible {
  background: linear-gradient(180deg, #7445fb 0%, #5222d8 100%);
}

@media (max-width: 767px) {
  .jgpc-builder__grid {
    gap: 10px;
  }

  .jgpc-stage-wrap {
    padding: 12px 14px 60px;
  }

  .jgpc-stage {
    width: min(100%, 264px);
    max-width: 264px;
    max-height: calc(44dvh - 66px);
  }

  .jgpc-inline-editor-bar {
    padding: 10px 12px 12px;
    border-radius: 18px 18px 0 0;
  }

  .jgpc-inline-editor-actions {
    gap: 8px;
  }

  .jgpc-inline-editor-actions .jgpc-tool-btn {
    min-height: 42px;
    height: 42px;
    font-size: 14px;
  }

  .jgpc-step--variant {
    padding: 10px 12px;
  }
}

@media (min-width: 768px) {
  .jgpc-builder__grid {
    grid-template-columns: 292px minmax(0, 1fr) !important;
    gap: 20px;
  }

  .jgpc-builder__panel {
    width: 292px;
    max-width: 292px;
    min-width: 292px;
    padding: 0 0 10px;
  }

  .jgpc-canvas-topbar {
    margin-bottom: 2px;
  }

  .jgpc-stage-wrap {
    padding: 16px 18px 74px;
  }

  .jgpc-stage {
    width: min(100%, 680px);
    max-height: calc(100dvh - 205px);
  }

  .jgpc-inline-editor-bar {
    padding: 12px 14px 14px;
    border-radius: 18px;
  }

  .jgpc-inline-editor-textrow {
    grid-template-columns: 46px minmax(0, 1.6fr) 72px minmax(140px, 180px);
  }

  .jgpc-step--variant {
    padding: 10px 12px 12px;
  }

  .jgpc-step--buy {
    padding: 10px 12px 12px;
  }

  .jgpc-mobile-buybar {
    gap: 10px;
  }
}
/* JGPC V2.3.1 OPTION A REFINEMENTS */
.jgpc-builder__grid {
  align-items: stretch;
}

.jgpc-preview-shell {
  gap: 12px;
}

.jgpc-canvas-topbar {
  gap: 12px;
  padding: 2px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.jgpc-canvas-topbar .jgpc-tool-btn {
  min-height: 46px;
  height: 46px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  font-size: 15px;
  font-weight: 700;
}

.jgpc-stage-wrap {
  border-radius: 28px;
  padding: 18px 18px 74px;
  background: radial-gradient(circle at top, rgba(109, 61, 242, 0.05), rgba(255, 255, 255, 0) 34%), linear-gradient(180deg, #ffffff 0%, #f8fafd 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.jgpc-stage {
  filter: drop-shadow(0 22px 30px rgba(15, 23, 42, 0.08));
}

.jgpc-inline-layer-ui {
  border: 2px solid rgba(109, 61, 242, 0.56);
  box-shadow: 0 0 0 7px rgba(109, 61, 242, 0.08);
}

.jgpc-inline-layer-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  font-size: 16px;
}

.jgpc-inline-editor-bar {
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.08);
}

.jgpc-inline-editor-textrow {
  gap: 10px;
  grid-template-columns: 48px minmax(0, 1fr) 74px minmax(136px, 160px);
}

.jgpc-inline-editor-textrow input[type="text"],
.jgpc-inline-editor-textrow input[type="number"],
.jgpc-inline-editor-textrow select {
  border-radius: 14px;
  min-height: 46px;
  height: 46px;
  font-size: 15px;
}

.jgpc-inline-editor-textrow input[type="color"] {
  border-radius: 14px;
}

.jgpc-inline-editor-actions {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.jgpc-inline-editor-actions .jgpc-tool-btn {
  min-height: 46px;
  height: 46px;
  border-radius: 14px;
  background: #ffffff;
}

.jgpc-builder__panel {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
}

.jgpc-panel-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
}

.jgpc-step--variant,
.jgpc-step--buy {
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
}

.jgpc-step--variant {
  padding: 14px;
}

.jgpc-step--buy {
  margin-top: auto;
  padding: 14px;
  box-shadow: 0 14px 32px rgba(109, 61, 242, 0.08);
}

.jgpc-step__head {
  gap: 10px;
}

.jgpc-selector-grid {
  gap: 10px;
}

.jgpc-stock-badge {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
}

.jgpc-mobile-buybar {
  align-items: stretch;
}

.jgpc-mobile-buybar__meta {
  gap: 2px;
}

.jgpc-mobile-buybar__price {
  font-size: clamp(30px, 2.3vw, 42px);
  line-height: 1;
}

.jgpc-submit {
  min-height: 52px;
  height: 52px;
  border-radius: 16px;
  font-size: 15px;
}

@media (max-width: 767px) {
  .jgpc-preview-shell {
    gap: 8px;
  }

  .jgpc-canvas-topbar {
    gap: 10px;
  }

  .jgpc-canvas-topbar .jgpc-tool-btn {
    min-height: 44px;
    height: 44px;
    font-size: 14px;
  }

  .jgpc-stage-wrap {
    padding: 12px 12px 58px;
    border-radius: 24px;
  }

  .jgpc-inline-layer-btn {
    width: 36px;
    height: 36px;
  }

  .jgpc-inline-editor-bar {
    padding: 10px 10px 12px;
    border-radius: 22px 22px 0 0;
  }

  .jgpc-inline-editor-textrow {
    grid-template-columns: 44px minmax(0, 1fr) 64px;
  }

  .jgpc-inline-editor-textrow select {
    grid-column: 1 / -1;
  }

  .jgpc-inline-editor-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .jgpc-step--variant,
  .jgpc-step--buy {
    border-radius: 18px;
    padding: 12px;
  }

  .jgpc-submit {
    min-height: 50px;
    height: 50px;
  }
}

@media (min-width: 768px) {
  .jgpc-builder__grid {
    grid-template-columns: 280px minmax(0, 1fr) !important;
    gap: 18px;
  }

  .jgpc-builder__panel {
    width: 280px;
    max-width: 280px;
    min-width: 280px;
    height: calc(100dvh - 24px);
    max-height: calc(100dvh - 24px);
    padding: 10px;
  }

  .jgpc-panel-stack {
    padding-right: 2px;
  }

  .jgpc-stage-wrap {
    padding: 18px 18px 78px;
  }

  .jgpc-stage {
    width: min(100%, 720px);
  }

  .jgpc-inline-editor-bar {
    padding: 12px;
  }
}

/* JGPC V2.4 RESPONSIVE COMPACTION */
.jgpc-builder__grid {
  width: 100%;
  align-items: stretch;
}

.jgpc-preview-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
}

.jgpc-canvas-topbar {
  margin: 0;
}

.jgpc-canvas-topbar .jgpc-tool-btn {
  padding-inline: 14px;
}

.jgpc-stage-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.jgpc-stage {
  width: min(100%, 100%);
  margin-inline: auto;
}

.jgpc-inline-editor-bar {
  margin-top: 8px;
}

.jgpc-inline-editor-image,
.jgpc-inline-editor-text {
  gap: 10px;
}

.jgpc-inline-editor-actions .jgpc-tool-btn {
  font-size: 15px;
}

.jgpc-step--variant,
.jgpc-step--buy {
  overflow: hidden;
}

.jgpc-step--buy .jgpc-mobile-buybar__meta {
  min-width: 0;
}

.jgpc-mobile-buybar__variant,
.jgpc-mobile-buybar__stock,
.jgpc-step--buy [data-buybar-state] {
  font-size: 13px;
  line-height: 1.3;
}

@media (max-width: 767px) {
  .jgpc-builder__grid {
    gap: 6px;
  }

  .jgpc-preview-shell {
    gap: 6px;
  }

  .jgpc-canvas-topbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    position: sticky;
    top: 0;
    z-index: 35;
    padding: 0;
    background: #fff;
  }

  .jgpc-canvas-topbar .jgpc-tool-btn {
    min-height: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 14px;
  }

  .jgpc-stage-wrap {
    top: 50px;
    min-height: clamp(260px, 40dvh, 380px);
    max-height: clamp(260px, 40dvh, 380px);
    padding: 8px 8px 52px;
    border-radius: 22px;
  }

  .jgpc-stage {
    width: min(100%, 82vw);
    max-width: 320px;
    max-height: calc(clamp(260px, 40dvh, 380px) - 16px);
  }

  .jgpc-inline-layer-ui {
    box-shadow: 0 0 0 5px rgba(109, 61, 242, 0.08);
  }

  .jgpc-inline-layer-btn {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    font-size: 15px;
  }

  .jgpc-inline-editor-bar {
    margin-top: 6px;
    padding: 8px 8px calc(10px + env(safe-area-inset-bottom));
    border-radius: 18px 18px 0 0;
  }

  .jgpc-inline-editor-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .jgpc-inline-editor-actions .jgpc-tool-btn {
    min-height: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 14px;
  }

  .jgpc-inline-editor-zoom {
    grid-template-columns: 46px minmax(0, 1fr) 42px;
    gap: 8px;
  }

  .jgpc-inline-editor-textrow {
    grid-template-columns: 42px minmax(0, 1fr) 58px;
    gap: 8px;
  }

  .jgpc-inline-editor-textrow input[type="text"],
  .jgpc-inline-editor-textrow input[type="number"],
  .jgpc-inline-editor-textrow select {
    min-height: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 14px;
  }

  .jgpc-builder__panel {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    overflow: visible;
  }

  .jgpc-panel-stack {
    gap: 8px;
    height: auto;
    overflow: visible;
    padding: 0 0 calc(84px + env(safe-area-inset-bottom));
  }

  .jgpc-step--variant {
    padding: 10px;
    border-radius: 16px;
  }

  .jgpc-step__head {
    margin-bottom: 8px;
  }

  .jgpc-selector-grid {
    gap: 8px;
  }

  .jgpc-selector-block label {
    margin-bottom: 4px;
  }

  .jgpc-step--buy {
    position: sticky;
    bottom: calc(8px + env(safe-area-inset-bottom));
    z-index: 34;
    margin-top: 0;
    padding: 10px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(14px);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
  }

  .jgpc-mobile-buybar {
    gap: 8px;
  }

  .jgpc-mobile-buybar__price {
    font-size: 24px;
  }

  .jgpc-submit {
    min-height: 50px;
    height: 50px;
    border-radius: 14px;
    font-size: 15px;
  }
}

@media (min-width: 768px) {
  .jgpc-builder__grid {
    grid-template-columns: clamp(248px, 23vw, 288px) minmax(0, 1fr) !important;
    gap: 16px;
  }

  .jgpc-builder__panel {
    width: auto;
    max-width: none;
    min-width: 0;
    height: calc(100dvh - 20px);
    max-height: calc(100dvh - 20px);
    padding: 8px;
  }

  .jgpc-panel-stack {
    gap: 10px;
    padding-right: 2px;
  }

  .jgpc-step--variant {
    padding: 12px;
  }

  .jgpc-step--buy {
    padding: 12px;
    border-radius: 20px;
  }

  .jgpc-mobile-buybar__price {
    font-size: clamp(22px, 2vw, 34px);
  }

  .jgpc-preview-shell {
    height: calc(100dvh - 20px);
    max-height: calc(100dvh - 20px);
    padding: 8px;
  }

  .jgpc-canvas-topbar {
    gap: 10px;
  }

  .jgpc-canvas-topbar .jgpc-tool-btn {
    min-height: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 14px;
  }

  .jgpc-stage-wrap {
    padding: 12px 14px 70px;
    border-radius: 24px;
    max-height: none;
  }

  .jgpc-stage {
    width: min(100%, min(76dvh, 760px));
    max-height: calc(100dvh - 210px);
  }

  .jgpc-inline-layer-btn {
    width: 36px;
    height: 36px;
    font-size: 15px;
  }

  .jgpc-inline-editor-bar {
    padding: 10px;
    border-radius: 20px;
  }

  .jgpc-inline-editor-textrow {
    grid-template-columns: 44px minmax(0, 1fr) 68px minmax(130px, 156px);
  }

  .jgpc-inline-editor-textrow input[type="text"],
  .jgpc-inline-editor-textrow input[type="number"],
  .jgpc-inline-editor-textrow select {
    min-height: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 14px;
  }

  .jgpc-inline-editor-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .jgpc-inline-editor-actions .jgpc-tool-btn {
    min-height: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 14px;
  }
}

/* JGPC V2.4.1 SPACE RECOVERY */
.jgpc-preview-shell {
  gap: 8px;
}

.jgpc-canvas-topbar {
  gap: 8px;
}

.jgpc-canvas-topbar .jgpc-tool-btn {
  min-height: 40px;
  height: 40px;
  padding-inline: 12px;
  border-radius: 14px;
  font-size: 14px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
}

.jgpc-stage-wrap {
  padding: 10px 10px 58px;
  border-radius: 22px;
}

.jgpc-inline-layer-btn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-size: 14px;
}

.jgpc-inline-editor-bar {
  margin-top: 4px;
  padding: 8px;
  border-radius: 18px;
}

.jgpc-inline-editor-actions {
  gap: 8px;
}

.jgpc-inline-editor-actions .jgpc-tool-btn {
  min-height: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 14px;
}

.jgpc-inline-editor-textrow {
  gap: 8px;
}

.jgpc-inline-editor-textrow input[type="text"],
.jgpc-inline-editor-textrow input[type="number"],
.jgpc-inline-editor-textrow select {
  min-height: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 14px;
}

.jgpc-step--variant,
.jgpc-step--buy {
  border-radius: 18px;
}

.jgpc-step--variant {
  padding: 10px;
}

.jgpc-step--buy {
  padding: 10px;
}

.jgpc-step__head {
  margin-bottom: 6px;
}

.jgpc-selector-grid {
  gap: 8px;
}

.jgpc-selector-block select {
  min-height: 40px;
  height: 40px;
  border-radius: 12px;
}

.jgpc-stock-badge {
  min-height: 40px;
  border-radius: 16px;
  font-size: 13px;
}

.jgpc-mobile-buybar__price {
  line-height: 1;
}

.jgpc-submit {
  min-height: 46px;
  height: 46px;
  border-radius: 14px;
  font-size: 14px;
}

@media (max-width: 767px) {
  .jgpc-builder__grid {
    gap: 4px;
  }

  .jgpc-canvas-topbar .jgpc-tool-btn {
    min-height: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 13px;
  }

  .jgpc-stage-wrap {
    top: 46px;
    min-height: clamp(230px, 34dvh, 320px);
    max-height: clamp(230px, 34dvh, 320px);
    padding: 6px 6px 48px;
    border-radius: 18px;
  }

  .jgpc-stage {
    width: min(100%, 88vw);
    max-width: 340px;
    max-height: calc(clamp(230px, 34dvh, 320px) - 12px);
  }

  .jgpc-inline-layer-btn {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    font-size: 13px;
  }

  .jgpc-inline-editor-bar {
    padding: 6px 6px calc(8px + env(safe-area-inset-bottom));
    border-radius: 16px 16px 0 0;
  }

  .jgpc-inline-editor-actions .jgpc-tool-btn,
  .jgpc-inline-editor-textrow input[type="text"],
  .jgpc-inline-editor-textrow input[type="number"],
  .jgpc-inline-editor-textrow select {
    min-height: 38px;
    height: 38px;
    font-size: 13px;
  }

  .jgpc-panel-stack {
    gap: 6px;
    padding-bottom: calc(74px + env(safe-area-inset-bottom));
  }

  .jgpc-step--variant {
    padding: 8px;
  }

  .jgpc-step--buy {
    bottom: calc(6px + env(safe-area-inset-bottom));
    padding: 8px;
    border-radius: 16px;
  }

  .jgpc-mobile-buybar__price {
    font-size: 20px;
  }

  .jgpc-submit {
    min-height: 44px;
    height: 44px;
    border-radius: 12px;
    font-size: 14px;
  }
}

@media (min-width: 768px) {
  .jgpc-builder__grid {
    grid-template-columns: clamp(236px, 21vw, 272px) minmax(0, 1fr) !important;
    gap: 12px;
    align-items: start;
  }

  .jgpc-builder__panel {
    height: auto;
    max-height: none;
    align-self: start;
    padding: 6px;
    position: sticky;
    top: 8px;
  }

  .jgpc-panel-stack {
    height: auto;
    overflow: visible;
    gap: 8px;
    padding-right: 0;
  }

  .jgpc-step--buy {
    margin-top: 0;
  }

  .jgpc-preview-shell {
    height: auto;
    max-height: none;
    padding: 0;
  }

  .jgpc-canvas-topbar .jgpc-tool-btn {
    min-height: 38px;
    height: 38px;
    font-size: 13px;
  }

  .jgpc-stage-wrap {
    padding: 8px 10px 56px;
    min-height: calc(100dvh - 170px);
  }

  .jgpc-stage {
    width: min(100%, min(83dvh, 820px));
    max-height: calc(100dvh - 190px);
  }

  .jgpc-inline-editor-bar {
    padding: 8px;
  }

  .jgpc-inline-editor-actions .jgpc-tool-btn,
  .jgpc-inline-editor-textrow input[type="text"],
  .jgpc-inline-editor-textrow input[type="number"],
  .jgpc-inline-editor-textrow select {
    min-height: 38px;
    height: 38px;
    font-size: 13px;
  }

  .jgpc-mobile-buybar__price {
    font-size: clamp(18px, 1.8vw, 28px);
  }

  .jgpc-submit {
    min-height: 44px;
    height: 44px;
    font-size: 14px;
  }
}

/* JGPC V2.4.2 FINAL POLISH */
.jgpc-preview-shell {
  gap: 6px;
}

.jgpc-canvas-topbar {
  gap: 6px;
}

.jgpc-canvas-topbar .jgpc-tool-btn {
  min-height: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #fff;
  box-shadow: none;
  font-size: 13px;
  font-weight: 700;
}

.jgpc-stage-wrap {
  padding: 6px 8px 50px;
  border-radius: 18px;
}

.jgpc-inline-layer-ui {
  border-width: 1.5px;
  box-shadow: 0 0 0 4px rgba(109, 61, 242, 0.07);
}

.jgpc-inline-layer-btn {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  font-size: 13px;
}

.jgpc-inline-editor-bar {
  margin-top: 2px;
  padding: 6px;
  border-radius: 16px;
  box-shadow: 0 -4px 18px rgba(15, 23, 42, 0.06);
}

.jgpc-inline-editor-actions {
  gap: 6px;
}

.jgpc-inline-editor-actions .jgpc-tool-btn {
  min-height: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
}

.jgpc-inline-editor-zoom {
  grid-template-columns: 42px minmax(0, 1fr) 40px;
  gap: 8px;
  align-items: center;
}

.jgpc-inline-editor-zoom label,
.jgpc-inline-editor-zoom .jgpc-zoom-value {
  font-size: 12px;
}

.jgpc-inline-editor-textrow {
  grid-template-columns: 40px minmax(0, 1fr) 60px minmax(112px, 140px);
  gap: 6px;
}

.jgpc-inline-editor-textrow input[type="text"],
.jgpc-inline-editor-textrow input[type="number"],
.jgpc-inline-editor-textrow select,
.jgpc-selector-block select {
  min-height: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 13px;
}

.jgpc-inline-editor-textrow input[type="color"] {
  width: 40px;
  min-width: 40px;
  height: 36px;
  border-radius: 10px;
}

.jgpc-builder__panel {
  padding: 4px;
  border-radius: 18px;
  box-shadow: none;
}

.jgpc-panel-stack {
  gap: 6px;
}

.jgpc-step--variant,
.jgpc-step--buy {
  border-radius: 16px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
}

.jgpc-step--variant {
  padding: 8px;
}

.jgpc-step__head {
  gap: 8px;
  margin-bottom: 4px;
}

.jgpc-step__copy h3 {
  font-size: 15px;
  line-height: 1.15;
}

.jgpc-step__copy p,
.jgpc-step--buy [data-buybar-state],
.jgpc-mobile-buybar__variant,
.jgpc-mobile-buybar__stock {
  font-size: 12px;
}

.jgpc-step__number {
  width: 28px;
  height: 28px;
  font-size: 13px;
}

.jgpc-selector-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.jgpc-selector-block label {
  margin-bottom: 3px;
  font-size: 10px;
}

.jgpc-stock-badge {
  min-height: 36px;
  border-radius: 14px;
  padding: 8px 10px;
  font-size: 12px;
}

.jgpc-step--buy {
  padding: 8px;
}

.jgpc-mobile-buybar {
  gap: 6px;
}

.jgpc-mobile-buybar__price {
  font-size: clamp(16px, 2vw, 24px);
}

.jgpc-submit {
  min-height: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 13px;
  box-shadow: 0 10px 20px rgba(93, 47, 225, 0.18);
}

@media (max-width: 767px) {
  .jgpc-canvas-topbar .jgpc-tool-btn {
    min-height: 34px;
    height: 34px;
    font-size: 12px;
  }

  .jgpc-stage-wrap {
    top: 42px;
    min-height: clamp(214px, 32dvh, 296px);
    max-height: clamp(214px, 32dvh, 296px);
    padding: 4px 4px 44px;
    border-radius: 16px;
  }

  .jgpc-stage {
    width: min(100%, 90vw);
    max-width: 332px;
    max-height: calc(clamp(214px, 32dvh, 296px) - 8px);
  }

  .jgpc-inline-layer-btn {
    width: 26px;
    height: 26px;
    font-size: 12px;
  }

  .jgpc-inline-editor-bar {
    border-radius: 14px 14px 0 0;
    padding: 5px 5px calc(6px + env(safe-area-inset-bottom));
  }

  .jgpc-inline-editor-actions .jgpc-tool-btn,
  .jgpc-inline-editor-textrow input[type="text"],
  .jgpc-inline-editor-textrow input[type="number"],
  .jgpc-inline-editor-textrow select,
  .jgpc-selector-block select {
    min-height: 34px;
    height: 34px;
    font-size: 12px;
  }

  .jgpc-inline-editor-textrow {
    grid-template-columns: 36px minmax(0, 1fr) 52px;
  }

  .jgpc-inline-editor-textrow select {
    grid-column: 1 / -1;
  }

  .jgpc-step--variant,
  .jgpc-step--buy {
    border-radius: 14px;
    padding: 8px;
  }

  .jgpc-step__copy h3 {
    font-size: 14px;
  }

  .jgpc-step__number {
    width: 24px;
    height: 24px;
    font-size: 12px;
  }

  .jgpc-mobile-buybar__price {
    font-size: 16px;
  }

  .jgpc-submit {
    min-height: 40px;
    height: 40px;
    font-size: 13px;
  }
}

@media (min-width: 768px) {
  .jgpc-builder__grid {
    grid-template-columns: 228px minmax(0, 1fr) !important;
    gap: 10px;
  }

  .jgpc-builder__panel {
    top: 6px;
    padding: 2px;
  }

  .jgpc-preview-shell {
    gap: 4px;
  }

  .jgpc-stage-wrap {
    min-height: calc(100dvh - 150px);
    padding: 4px 6px 48px;
  }

  .jgpc-stage {
    width: min(100%, min(86dvh, 860px));
    max-height: calc(100dvh - 170px);
  }

  .jgpc-inline-editor-bar {
    padding: 6px;
  }
}

/* JGPC V2.4.3 CANVAS WIDTH AND MOBILE TITLE FIX */
:root {
  --jgpc-editor-max: min(92vw, min(86dvh, 820px));
}

.wp-block-post-title {
  margin: 0 0 12px;
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.jgpc-builder {
  max-width: 100%;
}

.jgpc-preview-shell {
  justify-items: center;
}

.jgpc-canvas-topbar,
.jgpc-stage-wrap,
.jgpc-inline-editor-bar {
  width: min(100%, var(--jgpc-editor-max));
  margin-inline: auto;
}

.jgpc-stage-wrap {
  min-width: 0;
}

.jgpc-stage {
  width: min(100%, calc(var(--jgpc-editor-max) - 12px));
}

.jgpc-inline-editor-bar {
  align-self: center;
}

.jgpc-step--buy {
  overflow: visible;
}

@media (max-width: 767px) {
  .wp-block-post-title {
    display: none;
  }

  .wp-block-group.alignfull.has-global-padding,
  .entry-content.alignfull.wp-block-post-content {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
  }

  :root {
    --jgpc-editor-max: min(100vw - 20px, 360px);
  }

  .jgpc-preview-shell {
    gap: 4px;
  }

  .jgpc-canvas-topbar,
  .jgpc-stage-wrap,
  .jgpc-inline-editor-bar,
  .jgpc-step--buy,
  .jgpc-step--variant {
    width: min(100%, var(--jgpc-editor-max));
  }

  .jgpc-canvas-topbar {
    top: 0;
  }

  .jgpc-stage-wrap {
    top: 40px;
    min-height: clamp(208px, 31dvh, 286px);
    max-height: clamp(208px, 31dvh, 286px);
  }

  .jgpc-stage {
    width: min(100%, 300px);
    max-width: 300px;
  }

  .jgpc-inline-editor-bar {
    margin-top: 0;
  }

  .jgpc-panel-stack {
    align-items: center;
    padding-bottom: calc(68px + env(safe-area-inset-bottom));
  }

  .jgpc-step--variant {
    order: 2;
  }

  .jgpc-step--buy {
    order: 1;
    position: sticky;
    bottom: calc(4px + env(safe-area-inset-bottom));
    margin-top: 0;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.10);
  }

  .jgpc-mobile-buybar__meta {
    gap: 1px;
  }

  .jgpc-mobile-buybar__variant,
  .jgpc-mobile-buybar__stock,
  .jgpc-step--buy [data-buybar-state] {
    font-size: 11px;
  }
}

@media (min-width: 768px) {
  :root {
    --jgpc-editor-max: min(calc(100vw - 310px), min(84dvh, 760px));
  }

  .jgpc-preview-shell {
    padding-right: 0;
  }

  .jgpc-canvas-topbar,
  .jgpc-stage-wrap,
  .jgpc-inline-editor-bar {
    width: min(100%, var(--jgpc-editor-max));
  }

  .jgpc-stage {
    width: min(100%, calc(var(--jgpc-editor-max) - 10px));
    max-height: calc(100dvh - 176px);
  }
}

@media (min-width: 768px) and (max-width: 1180px) {
  :root {
    --jgpc-editor-max: min(calc(100vw - 280px), 620px);
  }

  .jgpc-builder__grid {
    grid-template-columns: 212px minmax(0, 1fr) !important;
  }
}

/* JGPC V2.4.4 PROPORTION FIX */
@media (max-width: 767px) {
  .jgpc-panel-stack {
    align-items: stretch;
  }

  .jgpc-step--variant,
  .jgpc-step--buy {
    width: min(100%, var(--jgpc-editor-max));
    margin-inline: auto;
  }

  .jgpc-step--variant {
    order: 1;
  }

  .jgpc-step--buy {
    order: 2;
  }

  .jgpc-stage-wrap {
    min-height: clamp(228px, 34dvh, 310px);
    max-height: clamp(228px, 34dvh, 310px);
  }

  .jgpc-stage {
    width: min(100%, 312px);
    max-width: 312px;
    max-height: calc(clamp(228px, 34dvh, 310px) - 10px);
  }

  .jgpc-inline-editor-bar {
    width: min(100%, 372px);
  }
}

@media (min-width: 768px) {
  :root {
    --jgpc-stage-max: min(88dvh, 900px);
    --jgpc-toolbox-max: min(72vw, 640px);
  }

  .jgpc-builder__grid {
    grid-template-columns: 220px minmax(0, 1fr) !important;
    gap: 12px;
  }

  .jgpc-builder__panel {
    width: 220px;
    max-width: 220px;
    min-width: 220px;
  }

  .jgpc-step--variant,
  .jgpc-step--buy {
    border-radius: 14px;
  }

  .jgpc-step--variant {
    padding: 8px;
  }

  .jgpc-step--buy {
    padding: 8px;
  }

  .jgpc-canvas-topbar,
  .jgpc-inline-editor-bar {
    width: min(100%, var(--jgpc-toolbox-max));
  }

  .jgpc-stage-wrap {
    width: min(100%, var(--jgpc-stage-max));
    min-height: calc(100dvh - 126px);
    max-height: calc(100dvh - 126px);
    padding: 4px 6px 44px;
  }

  .jgpc-stage {
    width: min(100%, var(--jgpc-stage-max));
    max-height: calc(100dvh - 138px);
  }

  .jgpc-inline-editor-bar {
    padding-inline: 6px;
  }
}

@media (min-width: 768px) and (max-width: 1180px) {
  :root {
    --jgpc-stage-max: min(78vw, 700px);
    --jgpc-toolbox-max: min(74vw, 560px);
  }
}

/* JGPC V2.4.5 NARROW CENTERED EDITOR */
@media (min-width: 768px) {
  :root {
    --jgpc-editor-shell: min(100%, 760px);
    --jgpc-editor-stage: min(100%, 620px);
    --jgpc-editor-tools: min(100%, 520px);
  }

  .jgpc-builder__grid {
    grid-template-columns: 220px minmax(0, 1fr) !important;
    gap: 14px;
    align-items: start;
  }

  .jgpc-preview-shell {
    width: var(--jgpc-editor-shell);
    max-width: var(--jgpc-editor-shell);
    margin-inline: auto;
    justify-items: center;
    align-content: start;
  }

  .jgpc-canvas-topbar,
  .jgpc-inline-editor-bar {
    width: var(--jgpc-editor-tools);
    max-width: var(--jgpc-editor-tools);
  }

  .jgpc-stage-wrap {
    width: var(--jgpc-editor-stage);
    max-width: var(--jgpc-editor-stage);
    min-height: calc(100dvh - 132px);
    max-height: calc(100dvh - 132px);
    padding: 6px 8px 44px;
    border-radius: 18px;
  }

  .jgpc-stage {
    width: min(100%, 560px);
    max-width: 560px;
    max-height: calc(100dvh - 146px);
  }

  .jgpc-canvas-topbar .jgpc-tool-btn,
  .jgpc-inline-editor-actions .jgpc-tool-btn,
  .jgpc-inline-editor-textrow input[type="text"],
  .jgpc-inline-editor-textrow input[type="number"],
  .jgpc-inline-editor-textrow select {
    min-height: 36px;
    height: 36px;
    font-size: 12px;
  }

  .jgpc-inline-editor-textrow {
    grid-template-columns: 38px minmax(0, 1fr) 56px minmax(110px, 132px);
  }

  .jgpc-inline-editor-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 768px) and (max-width: 1180px) {
  :root {
    --jgpc-editor-shell: min(100%, 640px);
    --jgpc-editor-stage: min(100%, 540px);
    --jgpc-editor-tools: min(100%, 500px);
  }

  .jgpc-builder__grid {
    grid-template-columns: 208px minmax(0, 1fr) !important;
  }

  .jgpc-stage {
    width: min(100%, 500px);
    max-width: 500px;
  }
}

@media (min-width: 1181px) {
  .jgpc-builder__grid {
    justify-content: center;
  }
}

/* =========================================================
   JGPC V3 VISUAL RESET - CLEAN CANVAS EDITOR
   Objetivo: mantener el flujo funcional, pero limpiar la interfaz.
   ========================================================= */
:root {
  --jgpc-v3-bg: #f5f7fb;
  --jgpc-v3-card: #ffffff;
  --jgpc-v3-card-2: #fbfcff;
  --jgpc-v3-text: #111827;
  --jgpc-v3-muted: #667085;
  --jgpc-v3-border: rgba(148, 163, 184, .24);
  --jgpc-v3-border-strong: rgba(124, 58, 237, .32);
  --jgpc-v3-accent: #6d3df2;
  --jgpc-v3-accent-dark: #4f22d2;
  --jgpc-v3-accent-soft: rgba(109, 61, 242, .09);
  --jgpc-v3-success-bg: #ecfdf3;
  --jgpc-v3-success-text: #067647;
  --jgpc-v3-danger-bg: #fef2f2;
  --jgpc-v3-danger-text: #b42318;
  --jgpc-v3-shadow: 0 18px 50px rgba(15, 23, 42, .08);
  --jgpc-v3-shadow-soft: 0 8px 24px rgba(15, 23, 42, .06);
}

.jgpc-builder,
.jgpc-builder * {
  box-sizing: border-box;
}

.jgpc-builder {
  width: min(100%, 1240px) !important;
  max-width: 1240px !important;
  margin: 16px auto 28px !important;
  padding: 0 12px !important;
  color: var(--jgpc-v3-text) !important;
  background: transparent !important;
}

.jgpc-builder__grid {
  display: grid !important;
  gap: 18px !important;
  align-items: start !important;
  width: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}

.jgpc-preview-shell,
.jgpc-builder__panel {
  border: 1px solid var(--jgpc-v3-border) !important;
  background: var(--jgpc-v3-card) !important;
  box-shadow: var(--jgpc-v3-shadow-soft) !important;
  border-radius: 22px !important;
}

.jgpc-preview-shell {
  display: grid !important;
  gap: 12px !important;
  padding: 12px !important;
  justify-items: stretch !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

.jgpc-builder__panel {
  padding: 12px !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

.jgpc-summary,
.jgpc-preview-head,
.jgpc-live-product-card,
.jgpc-active-layer-bar,
.jgpc-step--quick-tools,
.jgpc-section--upload,
.jgpc-section--advanced,
.jgpc-instructions,
.jgpc-search-group {
  display: none !important;
}

.jgpc-canvas-topbar {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

.jgpc-tool-btn,
.jgpc-canvas-topbar .jgpc-tool-btn,
.jgpc-inline-editor-actions .jgpc-tool-btn,
.jgpc-submit {
  appearance: none !important;
  min-height: 46px !important;
  height: auto !important;
  border-radius: 14px !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  letter-spacing: -.01em !important;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease !important;
}

.jgpc-tool-btn,
.jgpc-canvas-topbar .jgpc-tool-btn,
.jgpc-inline-editor-actions .jgpc-tool-btn {
  border: 1px solid var(--jgpc-v3-border) !important;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%) !important;
  color: var(--jgpc-v3-text) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,.85) inset !important;
}

.jgpc-tool-btn:hover,
.jgpc-canvas-topbar .jgpc-tool-btn:hover,
.jgpc-inline-editor-actions .jgpc-tool-btn:hover {
  transform: translateY(-1px) !important;
  border-color: var(--jgpc-v3-border-strong) !important;
  background: #fff !important;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .08) !important;
}

.jgpc-stage-wrap {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-height: 420px !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 22px !important;
  border: 1px solid rgba(148, 163, 184, .18) !important;
  border-radius: 24px !important;
  background:
    radial-gradient(circle at 50% 0%, rgba(109,61,242,.08), rgba(109,61,242,0) 38%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9) !important;
  overflow: visible !important;
}

.jgpc-stage {
  width: min(100%, 620px) !important;
  max-width: 620px !important;
  max-height: 68vh !important;
  margin: 0 auto !important;
  border: 0 !important;
  border-radius: 18px !important;
  background: transparent !important;
  filter: drop-shadow(0 18px 28px rgba(15, 23, 42, .10)) !important;
}

.jgpc-print-area {
  border: 1.5px dashed rgba(109,61,242,.48) !important;
  background: rgba(255,255,255,.12) !important;
  border-radius: 14px !important;
}

.jgpc-print-area__grid {
  opacity: .45 !important;
}

.jgpc-inline-layer-ui {
  border: 2px solid rgba(109,61,242,.62) !important;
  border-radius: 16px !important;
  box-shadow: 0 0 0 5px rgba(109,61,242,.08) !important;
}

.jgpc-inline-layer-btn {
  width: 34px !important;
  height: 34px !important;
  border-radius: 11px !important;
  border: 1px solid rgba(148, 163, 184, .25) !important;
  background: rgba(255,255,255,.96) !important;
  box-shadow: 0 8px 18px rgba(15,23,42,.14) !important;
  color: var(--jgpc-v3-text) !important;
  font-size: 14px !important;
}

.jgpc-inline-editor-bar {
  position: static !important;
  display: grid !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 10px !important;
  border: 1px solid var(--jgpc-v3-border) !important;
  border-radius: 18px !important;
  background: rgba(255,255,255,.96) !important;
  box-shadow: var(--jgpc-v3-shadow-soft) !important;
  backdrop-filter: blur(12px) !important;
}

.jgpc-inline-editor-mode {
  gap: 10px !important;
}

.jgpc-inline-editor-actions {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

.jgpc-inline-editor-zoom {
  display: grid !important;
  grid-template-columns: 48px minmax(0, 1fr) 44px !important;
  gap: 8px !important;
  align-items: center !important;
}

.jgpc-inline-editor-zoom label,
.jgpc-inline-editor-zoom .jgpc-zoom-value,
.jgpc-inline-editor-bar [data-inline-mode="none"] span {
  color: var(--jgpc-v3-muted) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

.jgpc-inline-editor-textrow {
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr) 62px minmax(118px, 150px) !important;
  gap: 8px !important;
  align-items: center !important;
}

.jgpc-inline-editor-textrow input[type="color"] {
  width: 42px !important;
  min-width: 42px !important;
  height: 42px !important;
  padding: 4px !important;
  border-radius: 12px !important;
  border: 1px solid var(--jgpc-v3-border) !important;
  background: #fff !important;
}

.jgpc-form select,
.jgpc-form input[type="text"],
.jgpc-form input[type="number"],
.jgpc-inline-editor-textrow input[type="text"],
.jgpc-inline-editor-textrow input[type="number"],
.jgpc-inline-editor-textrow select,
.jgpc-selector-block select {
  width: 100% !important;
  min-height: 42px !important;
  height: 42px !important;
  padding: 0 12px !important;
  border: 1px solid var(--jgpc-v3-border) !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: var(--jgpc-v3-text) !important;
  font-size: 14px !important;
  box-shadow: none !important;
}

.jgpc-form select:focus,
.jgpc-form input[type="text"]:focus,
.jgpc-form input[type="number"]:focus,
.jgpc-inline-editor-textrow input:focus,
.jgpc-inline-editor-textrow select:focus {
  outline: none !important;
  border-color: rgba(109,61,242,.55) !important;
  box-shadow: 0 0 0 4px rgba(109,61,242,.10) !important;
}

.jgpc-panel-stack {
  display: grid !important;
  gap: 10px !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  padding: 0 !important;
}

.jgpc-step--variant,
.jgpc-step--buy {
  display: block !important;
  margin: 0 !important;
  padding: 12px !important;
  border: 1px solid var(--jgpc-v3-border) !important;
  border-radius: 18px !important;
  background: var(--jgpc-v3-card) !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.jgpc-step__head {
  display: flex !important;
  align-items: center !important;
  gap: 9px !important;
  margin: 0 0 10px !important;
}

.jgpc-step__number {
  flex: 0 0 auto !important;
  width: 28px !important;
  height: 28px !important;
  border-radius: 10px !important;
  background: linear-gradient(180deg, var(--jgpc-v3-accent), var(--jgpc-v3-accent-dark)) !important;
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(109,61,242,.18) !important;
  font-size: 13px !important;
  font-weight: 900 !important;
}

.jgpc-step__copy h3,
.jgpc-section__title {
  margin: 0 !important;
  color: var(--jgpc-v3-text) !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  line-height: 1.15 !important;
  letter-spacing: -.02em !important;
}

.jgpc-step__copy p,
.jgpc-step--buy [data-buybar-state] {
  display: none !important;
}

.jgpc-selector-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 9px !important;
}

.jgpc-selector-block {
  display: grid !important;
  gap: 4px !important;
}

.jgpc-selector-block label {
  margin: 0 !important;
  color: var(--jgpc-v3-muted) !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: .06em !important;
  text-transform: uppercase !important;
}

.jgpc-stock-badge {
  display: flex !important;
  align-items: center !important;
  min-height: 42px !important;
  padding: 9px 11px !important;
  border-radius: 14px !important;
  border: 1px solid rgba(22, 101, 52, .16) !important;
  background: var(--jgpc-v3-success-bg) !important;
  color: var(--jgpc-v3-success-text) !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

.jgpc-stock-badge.is-bad {
  border-color: rgba(180, 35, 24, .18) !important;
  background: var(--jgpc-v3-danger-bg) !important;
  color: var(--jgpc-v3-danger-text) !important;
}

.jgpc-form__actions {
  position: static !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.jgpc-mobile-buybar {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 8px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.jgpc-mobile-buybar__meta {
  display: grid !important;
  gap: 2px !important;
  min-width: 0 !important;
}

.jgpc-mobile-buybar__price {
  color: var(--jgpc-v3-accent-dark) !important;
  font-size: 24px !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  letter-spacing: -.04em !important;
}

.jgpc-mobile-buybar__variant,
.jgpc-mobile-buybar__stock {
  color: var(--jgpc-v3-muted) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  white-space: normal !important;
}

.jgpc-submit {
  width: 100% !important;
  min-height: 48px !important;
  border: 0 !important;
  background: linear-gradient(180deg, var(--jgpc-v3-accent), var(--jgpc-v3-accent-dark)) !important;
  color: #fff !important;
  box-shadow: 0 12px 24px rgba(79,34,210,.22) !important;
}

.jgpc-submit:hover,
.jgpc-submit:focus-visible {
  transform: translateY(-1px) !important;
  box-shadow: 0 14px 28px rgba(79,34,210,.28) !important;
}

.jgpc-submit.is-disabled,
.jgpc-submit:disabled {
  opacity: .55 !important;
  transform: none !important;
  box-shadow: none !important;
}

@media (min-width: 900px) {
  .jgpc-builder {
    margin-top: 20px !important;
  }

  .jgpc-builder__grid {
    grid-template-columns: 300px minmax(0, 1fr) !important;
    gap: 20px !important;
  }

  .jgpc-builder__panel {
    position: sticky !important;
    top: 14px !important;
    width: 300px !important;
    max-width: 300px !important;
    min-width: 300px !important;
  }

  .jgpc-preview-shell {
    position: sticky !important;
    top: 14px !important;
    max-width: 860px !important;
    margin-inline: auto !important;
  }

  .jgpc-stage-wrap {
    min-height: min(72vh, 680px) !important;
  }

  .jgpc-stage {
    width: min(100%, 680px) !important;
    max-width: 680px !important;
  }
}

@media (min-width: 1200px) {
  .jgpc-builder__grid {
    grid-template-columns: 320px minmax(0, 880px) !important;
    justify-content: center !important;
  }

  .jgpc-builder__panel {
    width: 320px !important;
    max-width: 320px !important;
    min-width: 320px !important;
  }

  .jgpc-stage {
    width: min(100%, 720px) !important;
    max-width: 720px !important;
  }
}

@media (max-width: 899px) {
  .jgpc-builder {
    padding: 0 10px calc(88px + env(safe-area-inset-bottom)) !important;
    margin-top: 8px !important;
  }

  .jgpc-builder__grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .jgpc-preview-shell {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    gap: 8px !important;
  }

  .jgpc-canvas-topbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 40 !important;
    padding: 6px 0 !important;
    background: linear-gradient(180deg, #fff 0%, rgba(255,255,255,.96) 100%) !important;
  }

  .jgpc-canvas-topbar .jgpc-tool-btn {
    min-height: 42px !important;
    border-radius: 13px !important;
    font-size: 13px !important;
  }

  .jgpc-stage-wrap {
    min-height: clamp(285px, 42dvh, 420px) !important;
    max-height: none !important;
    padding: 12px !important;
    border-radius: 22px !important;
  }

  .jgpc-stage {
    width: min(100%, 340px) !important;
    max-width: 340px !important;
    max-height: 40dvh !important;
  }

  .jgpc-inline-editor-bar {
    position: sticky !important;
    bottom: calc(82px + env(safe-area-inset-bottom)) !important;
    z-index: 38 !important;
    padding: 8px !important;
    border-radius: 18px !important;
  }

  .jgpc-inline-editor-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7px !important;
  }

  .jgpc-inline-editor-textrow {
    grid-template-columns: 40px minmax(0, 1fr) 58px !important;
  }

  .jgpc-inline-editor-textrow select {
    grid-column: 1 / -1 !important;
  }

  .jgpc-builder__panel {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .jgpc-panel-stack {
    gap: 8px !important;
  }

  .jgpc-step--buy {
    position: fixed !important;
    left: 10px !important;
    right: 10px !important;
    bottom: calc(8px + env(safe-area-inset-bottom)) !important;
    z-index: 45 !important;
    max-width: 420px !important;
    margin-inline: auto !important;
    padding: 10px !important;
    border-radius: 18px !important;
    box-shadow: 0 14px 34px rgba(15,23,42,.16) !important;
  }

  .jgpc-step--buy .jgpc-step__head {
    display: none !important;
  }

  .jgpc-mobile-buybar {
    gap: 7px !important;
  }

  .jgpc-mobile-buybar__price {
    font-size: 20px !important;
  }

  .jgpc-submit {
    min-height: 46px !important;
    border-radius: 14px !important;
  }
}

/* =========================================================
   JGPC VISUAL V4 - PRODUCT READY REFINEMENTS
   Goal: keep the working flow, remove overlay clutter, improve mobile rhythm.
   ========================================================= */

.jgpc-builder {
  --jgpc-v4-border: #e5eaf3;
  --jgpc-v4-soft: #f8fafc;
  --jgpc-v4-text: #101827;
  --jgpc-v4-muted: #64748b;
}

.jgpc-stage-wrap {
  overflow: visible !important;
}

.jgpc-stage {
  isolation: isolate !important;
}

.jgpc-inline-layer-ui {
  pointer-events: none !important;
}

.jgpc-inline-layer-btn {
  pointer-events: auto !important;
}

.jgpc-inline-layer-btn {
  width: 34px !important;
  height: 34px !important;
  border-radius: 11px !important;
  background: rgba(255,255,255,.94) !important;
  border: 1px solid rgba(203,213,225,.9) !important;
  box-shadow: 0 8px 20px rgba(15,23,42,.12) !important;
  font-size: 15px !important;
}

.jgpc-inline-editor-bar {
  border-color: var(--jgpc-v4-border) !important;
  background: rgba(255,255,255,.96) !important;
  box-shadow: 0 10px 26px rgba(15,23,42,.08) !important;
}

.jgpc-inline-editor-actions .jgpc-tool-btn,
.jgpc-canvas-topbar .jgpc-tool-btn {
  white-space: nowrap !important;
}

.jgpc-step--variant .jgpc-step__head,
.jgpc-step--buy .jgpc-step__head {
  align-items: center !important;
}

.jgpc-selector-grid {
  align-items: end !important;
}

.jgpc-stock-badge {
  min-height: 38px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.jgpc-search-group {
  margin-top: 8px !important;
}

.jgpc-search-group label {
  color: var(--jgpc-v4-muted) !important;
  font-size: 10px !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
}

@media (min-width: 900px) {
  .jgpc-builder__grid {
    align-items: start !important;
  }

  .jgpc-builder__panel {
    order: 1 !important;
  }

  .jgpc-preview-shell {
    order: 2 !important;
  }

  .jgpc-canvas-topbar {
    max-width: 520px !important;
    margin-inline: auto !important;
  }

  .jgpc-stage-wrap {
    min-height: min(70vh, 650px) !important;
    padding: 28px !important;
  }

  .jgpc-inline-editor-bar {
    max-width: 520px !important;
    margin-inline: auto !important;
  }

  .jgpc-inline-editor-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 899px) {
  .jgpc-builder {
    padding: 0 10px 24px !important;
  }

  .jgpc-canvas-topbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 30 !important;
    padding: 8px 0 10px !important;
    gap: 8px !important;
  }

  .jgpc-canvas-topbar .jgpc-tool-btn {
    min-height: 42px !important;
    border-radius: 13px !important;
    font-size: 13px !important;
    padding-inline: 8px !important;
  }

  .jgpc-stage-wrap {
    min-height: auto !important;
    height: auto !important;
    padding: 18px 10px !important;
    border-radius: 22px !important;
    overflow: hidden !important;
  }

  .jgpc-stage {
    width: min(100%, 330px) !important;
    max-width: 330px !important;
    max-height: none !important;
  }

  .jgpc-inline-layer-btn {
    width: 32px !important;
    height: 32px !important;
    border-radius: 10px !important;
  }

  .jgpc-inline-editor-bar {
    position: static !important;
    inset: auto !important;
    z-index: auto !important;
    margin-top: -10px !important;
    padding: 8px !important;
    border-radius: 18px !important;
  }

  .jgpc-inline-editor-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7px !important;
  }

  .jgpc-inline-editor-actions .jgpc-tool-btn {
    min-height: 44px !important;
    border-radius: 13px !important;
    font-size: 13px !important;
  }

  .jgpc-inline-editor-zoom {
    grid-template-columns: 42px minmax(0, 1fr) 44px !important;
    gap: 8px !important;
    padding: 8px 2px 2px !important;
  }

  .jgpc-inline-editor-zoom label,
  .jgpc-zoom-value {
    font-size: 11px !important;
  }

  .jgpc-builder__panel {
    margin-top: 8px !important;
  }

  .jgpc-step,
  .jgpc-section,
  .jgpc-active-layer-bar {
    border-radius: 18px !important;
  }

  .jgpc-step--variant {
    padding: 12px !important;
  }

  .jgpc-selector-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 9px !important;
  }

  .jgpc-selector-block--brand {
    grid-column: 1 / -1 !important;
  }

  .jgpc-selector-block--stock {
    grid-column: 1 / -1 !important;
  }

  .jgpc-selector-block label {
    font-size: 9.5px !important;
  }

  .jgpc-selector-block select,
  .jgpc-search-input {
    min-height: 42px !important;
    border-radius: 12px !important;
    font-size: 13px !important;
    padding-inline: 12px !important;
  }

  .jgpc-stock-badge {
    min-height: 36px !important;
    width: 100% !important;
    justify-content: center !important;
  }

  .jgpc-step--buy {
    position: static !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    z-index: auto !important;
    max-width: none !important;
    margin: 8px 0 0 !important;
    padding: 12px !important;
    border-radius: 18px !important;
    box-shadow: 0 10px 28px rgba(15,23,42,.1) !important;
  }

  .jgpc-step--buy .jgpc-step__head {
    display: flex !important;
  }

  .jgpc-mobile-buybar {
    gap: 9px !important;
  }

  .jgpc-mobile-buybar__price {
    font-size: 23px !important;
  }

  .jgpc-submit {
    min-height: 48px !important;
    border-radius: 14px !important;
  }
}

@media (max-width: 420px) {
  .jgpc-stage {
    width: min(100%, 310px) !important;
    max-width: 310px !important;
  }

  .jgpc-selector-grid {
    grid-template-columns: 1fr !important;
  }

  .jgpc-selector-block,
  .jgpc-selector-block--brand,
  .jgpc-selector-block--stock {
    grid-column: 1 / -1 !important;
  }
}

/* =========================================================
   JGPC VISUAL V5 - FINAL LAYOUT + BEBAS NEUE
   Fixes mobile/tablet buy card clipping and improves typography.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@500;600;700;800;900&display=swap');

.jgpc-builder,
.jgpc-builder * {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

.jgpc-builder {
  overflow: visible !important;
  max-height: none !important;
}

.jgpc-builder__grid,
.jgpc-builder__panel,
.jgpc-panel-stack,
.jgpc-preview-shell,
.jgpc-step,
.jgpc-step--buy,
.jgpc-form,
.jgpc-form__actions,
.jgpc-mobile-buybar,
.jgpc-mobile-buybar__meta {
  overflow: visible !important;
  max-height: none !important;
}

.jgpc-step__copy h3,
.jgpc-section__title,
.jgpc-mobile-buybar__price,
.jgpc-submit,
.jgpc-tool-btn,
.jgpc-step__number {
  font-family: 'Bebas Neue', Impact, sans-serif !important;
  font-weight: 400 !important;
  letter-spacing: .025em !important;
}

.jgpc-step__copy h3,
.jgpc-section__title {
  font-size: 20px !important;
  line-height: 1 !important;
}

.jgpc-tool-btn,
.jgpc-submit {
  font-size: 18px !important;
  line-height: 1 !important;
}

.jgpc-mobile-buybar__price {
  font-size: 34px !important;
  line-height: .92 !important;
  letter-spacing: .01em !important;
}

.jgpc-step__number {
  font-size: 18px !important;
  line-height: 1 !important;
}

.jgpc-selector-block label,
.jgpc-mobile-buybar__variant,
.jgpc-mobile-buybar__stock,
.jgpc-step--buy [data-buybar-state],
.jgpc-stock-badge {
  font-family: 'Inter', system-ui, sans-serif !important;
}

/* More compact purchase card so the price and CTA are never hidden on short mobile/tablet viewports. */
@media (max-width: 899px) {
  .jgpc-builder {
    padding: 0 10px 36px !important;
  }

  .jgpc-step--buy {
    display: block !important;
    margin-top: 10px !important;
    padding: 12px !important;
    min-height: 0 !important;
    height: auto !important;
    overflow: visible !important;
  }

  .jgpc-step--buy .jgpc-step__head {
    display: none !important;
  }

  .jgpc-mobile-buybar {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    min-height: 0 !important;
  }

  .jgpc-mobile-buybar__meta {
    gap: 1px !important;
  }

  .jgpc-mobile-buybar__price {
    display: block !important;
    font-size: 32px !important;
    line-height: .9 !important;
    padding-top: 0 !important;
    margin: 0 !important;
    white-space: nowrap !important;
  }

  .jgpc-mobile-buybar__variant,
  .jgpc-mobile-buybar__stock {
    font-size: 11px !important;
    line-height: 1.15 !important;
  }

  .jgpc-submit {
    min-height: 46px !important;
    font-size: 19px !important;
    padding: 12px 14px !important;
  }
}

@media (min-width: 768px) and (max-width: 899px) {
  .jgpc-step--buy {
    max-width: 540px !important;
  }

  .jgpc-mobile-buybar {
    grid-template-columns: minmax(150px, .8fr) minmax(220px, 1.2fr) !important;
    align-items: center !important;
    gap: 12px !important;
  }

  .jgpc-submit {
    min-height: 50px !important;
  }
}

@media (max-width: 420px) {
  .jgpc-mobile-buybar__price {
    font-size: 30px !important;
  }

  .jgpc-tool-btn,
  .jgpc-submit {
    font-size: 17px !important;
  }
}

/* =========================================================
   JGPC VISUAL V6 - STUDIO ALL-IN
   One-screen canvas editor, contextual tools, mobile-safe buy flow.
   ========================================================= */

.jgpc-builder {
  --jgpc-v6-purple: #6d28d9;
  --jgpc-v6-purple-2: #8b5cf6;
  --jgpc-v6-ink: #111827;
  --jgpc-v6-muted: #64748b;
  --jgpc-v6-line: #e2e8f0;
  --jgpc-v6-card: #ffffff;
  --jgpc-v6-soft: #f8fafc;
  max-width: 1220px !important;
  margin: 0 auto !important;
  padding: 10px 14px 42px !important;
  overflow: visible !important;
}

.jgpc-studio-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  padding: 6px 2px 14px !important;
}

.jgpc-studio-header__brand {
  display: flex !important;
  flex-direction: column !important;
  gap: 1px !important;
}

.jgpc-studio-header__brand strong {
  font-family: 'Bebas Neue', Impact, sans-serif !important;
  font-size: 34px !important;
  line-height: .95 !important;
  letter-spacing: .02em !important;
  color: var(--jgpc-v6-ink) !important;
  font-weight: 400 !important;
}

.jgpc-studio-kicker {
  font-size: 11px !important;
  text-transform: uppercase !important;
  letter-spacing: .14em !important;
  color: var(--jgpc-v6-purple) !important;
  font-weight: 900 !important;
}

.jgpc-studio-steps {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
}

.jgpc-studio-steps span {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 30px !important;
  padding: 7px 11px !important;
  border-radius: 999px !important;
  background: #f5f3ff !important;
  color: #5b21b6 !important;
  border: 1px solid #ddd6fe !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}

.jgpc-builder .jgpc-builder__grid {
  display: grid !important;
  grid-template-columns: minmax(280px, 330px) minmax(0, 1fr) !important;
  gap: 26px !important;
  align-items: start !important;
  grid-template-areas: "panel preview" !important;
}

.jgpc-builder .jgpc-builder__panel {
  grid-area: panel !important;
  width: 100% !important;
  max-width: 330px !important;
  align-self: start !important;
  position: sticky !important;
  top: 18px !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.jgpc-builder .jgpc-preview-shell {
  grid-area: preview !important;
  width: 100% !important;
  min-width: 0 !important;
  padding: 18px !important;
  border-radius: 26px !important;
  border: 1px solid var(--jgpc-v6-line) !important;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%) !important;
  box-shadow: 0 20px 60px rgba(15, 23, 42, .06) !important;
  overflow: visible !important;
}

.jgpc-builder .jgpc-summary--hero,
.jgpc-builder .jgpc-preview-head,
.jgpc-builder .jgpc-live-product-card,
.jgpc-builder .jgpc-section--upload,
.jgpc-builder .jgpc-step--quick-tools,
.jgpc-builder .jgpc-section--advanced,
.jgpc-builder .jgpc-active-layer-bar {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.jgpc-builder .jgpc-canvas-topbar {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
  padding: 0 0 16px !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
  position: relative !important;
  z-index: 5 !important;
}

.jgpc-builder .jgpc-canvas-topbar .jgpc-tool-btn {
  min-height: 50px !important;
  border-radius: 16px !important;
  border: 1px solid var(--jgpc-v6-line) !important;
  background: #fff !important;
  color: #111827 !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .04) !important;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease !important;
}

.jgpc-builder .jgpc-canvas-topbar .jgpc-tool-btn:hover,
.jgpc-builder .jgpc-canvas-topbar .jgpc-tool-btn:focus-visible {
  transform: translateY(-1px) !important;
  border-color: #c4b5fd !important;
  box-shadow: 0 12px 32px rgba(109, 40, 217, .12) !important;
}

.jgpc-builder .jgpc-stage-wrap {
  max-width: 760px !important;
  margin: 0 auto !important;
  padding: clamp(16px, 2.5vw, 28px) !important;
  border-radius: 24px !important;
  border: 1px solid var(--jgpc-v6-line) !important;
  background:
    radial-gradient(circle at 50% 18%, rgba(139, 92, 246, .09), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
  overflow: visible !important;
}

.jgpc-builder .jgpc-stage {
  max-width: min(100%, 620px) !important;
  margin: 0 auto !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  transform: none !important;
}

.jgpc-builder .jgpc-inline-editor-bar {
  max-width: 760px !important;
  margin: 12px auto 0 !important;
  padding: 12px !important;
  border-radius: 22px !important;
  border: 1px solid var(--jgpc-v6-line) !important;
  background: rgba(255,255,255,.96) !important;
  box-shadow: 0 18px 44px rgba(15, 23, 42, .08) !important;
  backdrop-filter: blur(10px) !important;
  overflow: visible !important;
}

.jgpc-builder .jgpc-inline-editor-bar [data-inline-mode] {
  display: none !important;
}
.jgpc-builder .jgpc-inline-editor-bar[data-active-type="none"] [data-inline-mode="none"],
.jgpc-builder .jgpc-inline-editor-bar[data-active-type="image"] [data-inline-mode="image"],
.jgpc-builder .jgpc-inline-editor-bar[data-active-type="text"] [data-inline-mode="text"] {
  display: grid !important;
  gap: 12px !important;
}

.jgpc-builder .jgpc-inline-editor-title {
  font-family: 'Bebas Neue', Impact, sans-serif !important;
  font-size: 22px !important;
  line-height: 1 !important;
  letter-spacing: .03em !important;
  color: var(--jgpc-v6-ink) !important;
}

.jgpc-builder .jgpc-inline-editor-mode--empty {
  grid-template-columns: 1fr !important;
  text-align: center !important;
  color: var(--jgpc-v6-muted) !important;
  min-height: 64px !important;
  align-items: center !important;
  justify-items: center !important;
}

.jgpc-builder .jgpc-inline-editor-mode--empty strong {
  font-family: 'Bebas Neue', Impact, sans-serif !important;
  font-size: 24px !important;
  color: var(--jgpc-v6-ink) !important;
  font-weight: 400 !important;
}

.jgpc-builder .jgpc-inline-editor-mode--empty span {
  max-width: 560px !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
}

.jgpc-builder .jgpc-inline-editor-actions {
  display: flex !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

.jgpc-builder .jgpc-inline-editor-actions .jgpc-tool-btn,
.jgpc-builder .jgpc-inline-editor-bar .jgpc-tool-btn {
  min-height: 40px !important;
  padding: 10px 13px !important;
  border-radius: 13px !important;
  font-size: 16px !important;
  background: #fff !important;
  color: #111827 !important;
  border: 1px solid var(--jgpc-v6-line) !important;
  box-shadow: none !important;
}

.jgpc-builder .jgpc-tool-btn--danger {
  color: #b91c1c !important;
  border-color: #fecaca !important;
  background: #fff7f7 !important;
}

.jgpc-builder .jgpc-inline-editor-controls {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

.jgpc-builder .jgpc-control-range {
  display: grid !important;
  grid-template-columns: 62px minmax(0, 1fr) 48px !important;
  align-items: center !important;
  gap: 10px !important;
  min-height: 38px !important;
}

.jgpc-builder .jgpc-control-range span {
  font-size: 11px !important;
  color: var(--jgpc-v6-muted) !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
  letter-spacing: .04em !important;
}

.jgpc-builder .jgpc-control-range b {
  font-size: 12px !important;
  color: var(--jgpc-v6-muted) !important;
  text-align: right !important;
}

.jgpc-builder .jgpc-control-range input[type="range"] {
  width: 100% !important;
  accent-color: var(--jgpc-v6-purple-2) !important;
}

.jgpc-builder .jgpc-inline-editor-textrow {
  display: grid !important;
  grid-template-columns: minmax(150px, 1.35fr) minmax(135px, .9fr) 74px repeat(2, minmax(80px, .65fr)) minmax(130px, .8fr) minmax(86px, .65fr) 66px minmax(92px, .7fr) minmax(86px, .65fr) !important;
  gap: 8px !important;
  align-items: center !important;
}

.jgpc-builder .jgpc-inline-editor-textrow input[type="text"],
.jgpc-builder .jgpc-inline-editor-textrow input[type="number"],
.jgpc-builder .jgpc-inline-editor-textrow select {
  min-height: 40px !important;
  border-radius: 12px !important;
  border: 1px solid var(--jgpc-v6-line) !important;
  background: #fff !important;
  padding: 8px 10px !important;
  font-size: 13px !important;
}

.jgpc-builder .jgpc-color-pill,
.jgpc-builder .jgpc-mini-check {
  min-height: 40px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 7px !important;
  border: 1px solid var(--jgpc-v6-line) !important;
  border-radius: 12px !important;
  background: #fff !important;
  padding: 7px 9px !important;
  color: var(--jgpc-v6-muted) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
}

.jgpc-builder .jgpc-color-pill input[type="color"] {
  width: 28px !important;
  height: 28px !important;
  padding: 0 !important;
  border-radius: 999px !important;
  border: 0 !important;
  background: transparent !important;
}

.jgpc-builder .jgpc-mini-check input {
  width: 16px !important;
  height: 16px !important;
  accent-color: var(--jgpc-v6-purple) !important;
}

.jgpc-builder .jgpc-inline-layer-ui {
  pointer-events: none !important;
  border: 2px solid rgba(124, 58, 237, .94) !important;
  border-radius: 8px !important;
  box-shadow: 0 0 0 9999px rgba(124, 58, 237, .035) !important;
}

.jgpc-builder .jgpc-inline-layer-btn {
  pointer-events: auto !important;
  width: 34px !important;
  height: 34px !important;
  border-radius: 12px !important;
  border: 1px solid var(--jgpc-v6-line) !important;
  background: #fff !important;
  color: #111827 !important;
  box-shadow: 0 12px 28px rgba(15,23,42,.14) !important;
}

.jgpc-builder .jgpc-panel-stack {
  display: grid !important;
  gap: 14px !important;
  overflow: visible !important;
}

.jgpc-builder .jgpc-step--variant,
.jgpc-builder .jgpc-step--buy {
  border-radius: 22px !important;
  border: 1px solid var(--jgpc-v6-line) !important;
  background: #fff !important;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .06) !important;
  padding: 14px !important;
  overflow: visible !important;
}

.jgpc-builder .jgpc-step__head {
  align-items: flex-start !important;
  gap: 10px !important;
  margin-bottom: 12px !important;
}

.jgpc-builder .jgpc-step__number {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, var(--jgpc-v6-purple-2), var(--jgpc-v6-purple)) !important;
  color: #fff !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 10px 24px rgba(109,40,217,.24) !important;
}

.jgpc-builder .jgpc-step__copy h3 {
  font-size: 23px !important;
  color: var(--jgpc-v6-ink) !important;
  margin: 0 0 2px !important;
}

.jgpc-builder .jgpc-step__copy p,
.jgpc-builder .jgpc-instructions {
  display: none !important;
}

.jgpc-builder .jgpc-selector-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 10px !important;
}

.jgpc-builder .jgpc-selector-block--brand,
.jgpc-builder .jgpc-selector-block--stock {
  grid-column: 1 / -1 !important;
}

.jgpc-builder .jgpc-selector-block label {
  display: block !important;
  margin: 0 0 5px !important;
  color: var(--jgpc-v6-muted) !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
}

.jgpc-builder .jgpc-selector-block select,
.jgpc-builder .jgpc-search-input {
  min-height: 44px !important;
  border-radius: 14px !important;
  border: 1px solid var(--jgpc-v6-line) !important;
  background: #fff !important;
  box-shadow: none !important;
  font-size: 14px !important;
}

.jgpc-builder .jgpc-stock-badge,
.jgpc-builder .jgpc-summary__stock {
  min-height: 38px !important;
  border-radius: 13px !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

.jgpc-builder .jgpc-mobile-buybar {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 10px !important;
  width: 100% !important;
  overflow: visible !important;
}

.jgpc-builder .jgpc-mobile-buybar__price {
  font-family: 'Bebas Neue', Impact, sans-serif !important;
  font-size: 38px !important;
  line-height: .9 !important;
  color: var(--jgpc-v6-purple) !important;
  white-space: nowrap !important;
  display: block !important;
  margin: 0 !important;
}

.jgpc-builder .jgpc-mobile-buybar__variant,
.jgpc-builder .jgpc-mobile-buybar__stock {
  color: var(--jgpc-v6-muted) !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
}

.jgpc-builder .jgpc-submit {
  width: 100% !important;
  min-height: 50px !important;
  border-radius: 15px !important;
  background: linear-gradient(135deg, var(--jgpc-v6-purple-2), var(--jgpc-v6-purple)) !important;
  color: #fff !important;
  box-shadow: 0 18px 36px rgba(109, 40, 217, .22) !important;
  border: 0 !important;
}

@media (max-width: 1050px) {
  .jgpc-builder .jgpc-builder__grid {
    grid-template-columns: 1fr !important;
    grid-template-areas: "preview" "panel" !important;
    gap: 14px !important;
  }

  .jgpc-builder .jgpc-builder__panel {
    position: relative !important;
    top: auto !important;
    max-width: 620px !important;
    margin: 0 auto !important;
  }

  .jgpc-builder .jgpc-preview-shell {
    max-width: 760px !important;
    margin: 0 auto !important;
  }

  .jgpc-builder .jgpc-studio-header {
    max-width: 760px !important;
    margin: 0 auto !important;
  }
}

@media (max-width: 768px) {
  .jgpc-builder {
    padding: 8px 10px 118px !important;
  }

  .jgpc-studio-header {
    padding: 4px 0 10px !important;
    align-items: flex-start !important;
  }

  .jgpc-studio-header__brand strong {
    font-size: 28px !important;
  }

  .jgpc-studio-steps {
    display: none !important;
  }

  .jgpc-builder .jgpc-preview-shell {
    padding: 10px !important;
    border-radius: 20px !important;
    box-shadow: none !important;
  }

  .jgpc-builder .jgpc-canvas-topbar {
    gap: 8px !important;
    padding-bottom: 10px !important;
  }

  .jgpc-builder .jgpc-canvas-topbar .jgpc-tool-btn {
    min-height: 44px !important;
    border-radius: 13px !important;
    font-size: 16px !important;
    padding: 9px 8px !important;
  }

  .jgpc-builder .jgpc-stage-wrap {
    padding: 10px !important;
    border-radius: 18px !important;
    min-height: 360px !important;
    display: grid !important;
    align-items: center !important;
  }

  .jgpc-builder .jgpc-stage {
    max-width: min(100%, 410px) !important;
  }

  .jgpc-builder .jgpc-inline-editor-bar {
    position: sticky !important;
    bottom: 78px !important;
    z-index: 30 !important;
    margin-top: 8px !important;
    border-radius: 18px !important;
    padding: 10px !important;
    max-height: 42vh !important;
    overflow: auto !important;
  }

  .jgpc-builder .jgpc-inline-editor-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .jgpc-builder .jgpc-inline-editor-actions .jgpc-tool-btn {
    min-height: 42px !important;
    font-size: 16px !important;
  }

  .jgpc-builder .jgpc-inline-editor-controls {
    grid-template-columns: 1fr !important;
  }

  .jgpc-builder .jgpc-inline-editor-textrow {
    grid-template-columns: 1fr 1fr !important;
  }

  .jgpc-builder .jgpc-inline-editor-textrow input[type="text"] {
    grid-column: 1 / -1 !important;
  }

  .jgpc-builder .jgpc-selector-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  .jgpc-builder .jgpc-step--variant {
    padding: 13px !important;
  }

  .jgpc-builder .jgpc-step--buy {
    position: fixed !important;
    left: 10px !important;
    right: 10px !important;
    bottom: 10px !important;
    z-index: 40 !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 10px !important;
    border-radius: 20px !important;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .22) !important;
  }

  .jgpc-builder .jgpc-step--buy .jgpc-step__head {
    display: none !important;
  }

  .jgpc-builder .jgpc-mobile-buybar {
    grid-template-columns: minmax(112px, .8fr) minmax(160px, 1.2fr) !important;
    align-items: center !important;
    gap: 10px !important;
  }

  .jgpc-builder .jgpc-mobile-buybar__meta {
    min-width: 0 !important;
  }

  .jgpc-builder .jgpc-mobile-buybar__price {
    font-size: 30px !important;
  }

  .jgpc-builder .jgpc-submit {
    min-height: 48px !important;
    font-size: 18px !important;
  }
}

@media (max-width: 430px) {
  .jgpc-builder .jgpc-stage-wrap {
    min-height: 330px !important;
  }

  .jgpc-builder .jgpc-canvas-topbar {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  .jgpc-builder .jgpc-canvas-topbar .jgpc-tool-btn {
    font-size: 14px !important;
    letter-spacing: .02em !important;
  }

  .jgpc-builder .jgpc-selector-grid,
  .jgpc-builder .jgpc-inline-editor-textrow {
    grid-template-columns: 1fr !important;
  }

  .jgpc-builder .jgpc-mobile-buybar {
    grid-template-columns: 1fr !important;
    gap: 7px !important;
  }

  .jgpc-builder .jgpc-mobile-buybar__price {
    font-size: 28px !important;
  }

  .jgpc-builder .jgpc-submit {
    min-height: 44px !important;
  }
}

/* =========================================================
   JGPC V6.1 VISUAL STABILITY FIXES
   Objetivo: aislar el editor del theme, evitar cortes en móvil/tablet,
   compactar CTA y ordenar herramientas sin tocar el flujo funcional.
   ========================================================= */

.jgpc-builder {
  position: relative !important;
  isolation: isolate !important;
  z-index: 5 !important;
  clear: both !important;
  background:
    radial-gradient(circle at 50% 0%, rgba(124, 58, 237, .055), transparent 34%),
    linear-gradient(180deg, #fbfbff 0%, #f8fafc 100%) !important;
  border-radius: 28px !important;
  box-sizing: border-box !important;
}

.jgpc-builder::before {
  content: "" !important;
  position: absolute !important;
  inset: -8px !important;
  z-index: -1 !important;
  border-radius: 32px !important;
  background: inherit !important;
  pointer-events: none !important;
}

.jgpc-builder,
.jgpc-builder * {
  box-sizing: border-box !important;
}

.jgpc-builder img,
.jgpc-builder canvas,
.jgpc-builder svg,
.jgpc-builder video {
  max-width: 100% !important;
}

.jgpc-builder .jgpc-preview-shell,
.jgpc-builder .jgpc-builder__panel,
.jgpc-builder .jgpc-stage-wrap,
.jgpc-builder .jgpc-inline-editor-bar,
.jgpc-builder .jgpc-step--variant,
.jgpc-builder .jgpc-step--buy {
  position: relative !important;
  z-index: 2 !important;
}

.jgpc-builder .jgpc-preview-shell {
  overflow: visible !important;
  align-self: start !important;
}

.jgpc-builder .jgpc-stage-wrap {
  isolation: isolate !important;
  overflow: hidden !important;
}

.jgpc-builder .jgpc-stage {
  display: block !important;
  flex: 0 1 auto !important;
  object-fit: contain !important;
}

.jgpc-builder .jgpc-base-image,
.jgpc-builder .jgpc-overlay-image {
  object-fit: contain !important;
}

/* Toolbar de imagen: menos sensación de debug y sin desbordes. */
.jgpc-builder .jgpc-inline-editor-mode--image .jgpc-inline-editor-actions {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

.jgpc-builder .jgpc-inline-editor-mode--image .jgpc-tool-btn,
.jgpc-builder .jgpc-inline-editor-mode--text .jgpc-tool-btn {
  min-width: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* Panel de texto: de una barra larguísima a filas respirables. */
.jgpc-builder .jgpc-inline-editor-mode--text .jgpc-inline-editor-textrow {
  display: grid !important;
  grid-template-columns: minmax(160px, 1.4fr) minmax(140px, .95fr) 78px minmax(108px, .8fr) minmax(108px, .8fr) !important;
  gap: 9px !important;
  align-items: stretch !important;
}

.jgpc-builder .jgpc-inline-editor-mode--text .jgpc-inline-editor-textrow > * {
  min-width: 0 !important;
}

.jgpc-builder .jgpc-inline-editor-mode--text .jgpc-mini-check,
.jgpc-builder .jgpc-inline-editor-mode--text .jgpc-color-pill {
  min-width: 0 !important;
  overflow: hidden !important;
}

.jgpc-builder .jgpc-inline-editor-mode--text .jgpc-color-pill span,
.jgpc-builder .jgpc-inline-editor-mode--text .jgpc-mini-check {
  text-overflow: ellipsis !important;
}

.jgpc-builder .jgpc-inline-editor-controls {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

.jgpc-builder .jgpc-control-range {
  min-width: 0 !important;
}

.jgpc-builder .jgpc-control-range input[type="range"] {
  min-width: 0 !important;
}

.jgpc-builder .jgpc-inline-editor-mode--text .jgpc-inline-editor-actions {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

/* Compra: compacta y nunca cortada. */
.jgpc-builder .jgpc-step--buy,
.jgpc-builder .jgpc-form__actions,
.jgpc-builder .jgpc-mobile-buybar,
.jgpc-builder .jgpc-mobile-buybar__meta {
  overflow: visible !important;
  min-height: 0 !important;
  height: auto !important;
}

.jgpc-builder .jgpc-mobile-buybar__price {
  display: block !important;
  width: 100% !important;
  white-space: nowrap !important;
  overflow: visible !important;
}

.jgpc-builder .jgpc-mobile-buybar__variant,
.jgpc-builder .jgpc-mobile-buybar__stock {
  overflow-wrap: anywhere !important;
}

/* Evita que el editor flote encima del footer/contenido del theme en escritorio. */
@media (min-width: 1051px) {
  .jgpc-builder {
    padding-top: 18px !important;
    padding-bottom: 42px !important;
  }

  .jgpc-builder .jgpc-preview-shell {
    position: relative !important;
    top: auto !important;
  }

  .jgpc-builder .jgpc-builder__panel {
    position: sticky !important;
    top: 18px !important;
    z-index: 3 !important;
  }

  .jgpc-builder .jgpc-stage-wrap {
    min-height: clamp(520px, 68vh, 720px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .jgpc-builder .jgpc-stage {
    width: min(100%, 640px) !important;
    max-width: 640px !important;
    max-height: min(66vh, 680px) !important;
  }

  .jgpc-builder .jgpc-inline-editor-bar {
    position: relative !important;
    bottom: auto !important;
    max-width: 760px !important;
  }
}

@media (min-width: 769px) and (max-width: 1050px) {
  .jgpc-builder {
    max-width: 820px !important;
    padding-bottom: 40px !important;
  }

  .jgpc-builder .jgpc-builder__grid {
    grid-template-columns: 1fr !important;
    grid-template-areas: "preview" "panel" !important;
    gap: 16px !important;
  }

  .jgpc-builder .jgpc-preview-shell,
  .jgpc-builder .jgpc-builder__panel,
  .jgpc-builder .jgpc-studio-header {
    max-width: 760px !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .jgpc-builder .jgpc-builder__panel,
  .jgpc-builder .jgpc-preview-shell {
    position: relative !important;
    top: auto !important;
  }

  .jgpc-builder .jgpc-stage-wrap {
    min-height: 480px !important;
  }

  .jgpc-builder .jgpc-stage {
    width: min(100%, 560px) !important;
    max-width: 560px !important;
  }

  .jgpc-builder .jgpc-inline-editor-bar {
    position: relative !important;
    bottom: auto !important;
  }

  .jgpc-builder .jgpc-inline-editor-mode--text .jgpc-inline-editor-textrow {
    grid-template-columns: minmax(180px, 1fr) minmax(140px, 1fr) 80px minmax(110px, 1fr) minmax(110px, 1fr) !important;
  }
}

@media (max-width: 768px) {
  .jgpc-builder {
    max-width: 100% !important;
    margin-top: 0 !important;
    padding: 8px 10px 32px !important;
    border-radius: 0 !important;
    background: linear-gradient(180deg, #fbfbff 0%, #f8fafc 100%) !important;
    overflow: visible !important;
  }

  .jgpc-builder::before {
    inset: 0 !important;
    border-radius: 0 !important;
  }

  .jgpc-builder .jgpc-builder__grid {
    grid-template-columns: 1fr !important;
    grid-template-areas: "preview" "panel" !important;
    gap: 10px !important;
    overflow: visible !important;
    min-height: 0 !important;
    max-height: none !important;
  }

  .jgpc-builder .jgpc-preview-shell,
  .jgpc-builder .jgpc-builder__panel,
  .jgpc-builder .jgpc-studio-header {
    max-width: 520px !important;
    width: 100% !important;
    margin-inline: auto !important;
  }

  .jgpc-builder .jgpc-preview-shell {
    padding: 10px !important;
    border-radius: 20px !important;
    overflow: visible !important;
    box-shadow: 0 10px 32px rgba(15, 23, 42, .055) !important;
  }

  .jgpc-builder .jgpc-studio-header {
    padding: 2px 0 10px !important;
  }

  .jgpc-builder .jgpc-studio-header__brand strong {
    font-size: clamp(25px, 8vw, 32px) !important;
    line-height: .95 !important;
  }

  .jgpc-builder .jgpc-canvas-topbar {
    position: relative !important;
    top: auto !important;
    z-index: 6 !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
    padding-bottom: 10px !important;
    background: transparent !important;
  }

  .jgpc-builder .jgpc-canvas-topbar .jgpc-tool-btn {
    min-height: 42px !important;
    padding: 8px 6px !important;
    border-radius: 13px !important;
    font-size: 14px !important;
  }

  .jgpc-builder .jgpc-stage-wrap {
    min-height: clamp(320px, 48vh, 440px) !important;
    height: auto !important;
    max-height: none !important;
    padding: 12px !important;
    border-radius: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
  }

  .jgpc-builder .jgpc-stage {
    width: min(100%, 390px) !important;
    max-width: 390px !important;
    max-height: 44vh !important;
  }

  .jgpc-builder .jgpc-inline-layer-btn {
    width: 30px !important;
    height: 30px !important;
    border-radius: 10px !important;
    font-size: 13px !important;
  }

  .jgpc-builder .jgpc-inline-editor-bar {
    position: relative !important;
    bottom: auto !important;
    z-index: 8 !important;
    margin-top: 8px !important;
    padding: 10px !important;
    border-radius: 18px !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .jgpc-builder .jgpc-inline-editor-title {
    font-size: 20px !important;
  }

  .jgpc-builder .jgpc-inline-editor-mode--image .jgpc-inline-editor-actions,
  .jgpc-builder .jgpc-inline-editor-mode--text .jgpc-inline-editor-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .jgpc-builder .jgpc-inline-editor-actions .jgpc-tool-btn,
  .jgpc-builder .jgpc-inline-editor-bar .jgpc-tool-btn {
    min-height: 40px !important;
    padding: 8px 10px !important;
    border-radius: 12px !important;
    font-size: 15px !important;
  }

  .jgpc-builder .jgpc-inline-editor-controls {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .jgpc-builder .jgpc-control-range {
    grid-template-columns: 54px minmax(0, 1fr) 44px !important;
    gap: 8px !important;
  }

  .jgpc-builder .jgpc-inline-editor-mode--text .jgpc-inline-editor-textrow {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  .jgpc-builder .jgpc-inline-editor-mode--text .jgpc-inline-editor-textrow input[type="text"],
  .jgpc-builder .jgpc-inline-editor-mode--text .jgpc-inline-editor-textrow select {
    grid-column: 1 / -1 !important;
  }

  .jgpc-builder .jgpc-inline-editor-mode--text .jgpc-color-pill,
  .jgpc-builder .jgpc-inline-editor-mode--text .jgpc-mini-check {
    min-height: 40px !important;
    font-size: 11px !important;
  }

  .jgpc-builder .jgpc-builder__panel {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    position: relative !important;
    top: auto !important;
    overflow: visible !important;
  }

  .jgpc-builder .jgpc-panel-stack {
    gap: 10px !important;
    overflow: visible !important;
    padding: 0 0 4px !important;
  }

  .jgpc-builder .jgpc-step--variant,
  .jgpc-builder .jgpc-step--buy {
    width: 100% !important;
    margin-inline: auto !important;
    border-radius: 18px !important;
    padding: 12px !important;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .07) !important;
  }

  .jgpc-builder .jgpc-step--buy {
    position: sticky !important;
    left: auto !important;
    right: auto !important;
    bottom: calc(8px + env(safe-area-inset-bottom)) !important;
    z-index: 20 !important;
    max-width: 520px !important;
    margin-top: 0 !important;
  }

  .jgpc-builder .jgpc-step--buy .jgpc-step__head {
    display: none !important;
  }

  .jgpc-builder .jgpc-mobile-buybar {
    display: grid !important;
    grid-template-columns: minmax(96px, .75fr) minmax(158px, 1.25fr) !important;
    align-items: center !important;
    gap: 10px !important;
  }

  .jgpc-builder .jgpc-mobile-buybar__price {
    font-size: 29px !important;
    line-height: .9 !important;
  }

  .jgpc-builder .jgpc-mobile-buybar__variant,
  .jgpc-builder .jgpc-mobile-buybar__stock {
    font-size: 10.5px !important;
    line-height: 1.12 !important;
  }

  .jgpc-builder .jgpc-submit {
    min-height: 46px !important;
    border-radius: 15px !important;
    font-size: 17px !important;
    padding: 9px 12px !important;
  }
}

@media (max-width: 430px) {
  .jgpc-builder {
    padding-inline: 8px !important;
  }

  .jgpc-builder .jgpc-preview-shell {
    padding: 8px !important;
  }

  .jgpc-builder .jgpc-stage-wrap {
    min-height: clamp(300px, 45vh, 410px) !important;
    padding: 10px !important;
  }

  .jgpc-builder .jgpc-stage {
    width: min(100%, 345px) !important;
    max-width: 345px !important;
  }

  .jgpc-builder .jgpc-canvas-topbar .jgpc-tool-btn {
    font-size: 13px !important;
    min-height: 40px !important;
  }

  .jgpc-builder .jgpc-selector-grid {
    grid-template-columns: 1fr !important;
  }

  .jgpc-builder .jgpc-mobile-buybar {
    grid-template-columns: minmax(88px, .72fr) minmax(148px, 1.28fr) !important;
    gap: 8px !important;
  }

  .jgpc-builder .jgpc-mobile-buybar__price {
    font-size: 27px !important;
  }

  .jgpc-builder .jgpc-submit {
    font-size: 16px !important;
  }
}

@media (max-width: 360px) {
  .jgpc-builder .jgpc-mobile-buybar {
    grid-template-columns: 1fr !important;
  }

  .jgpc-builder .jgpc-mobile-buybar__price {
    font-size: 28px !important;
  }
}

/* =========================================================
   JGPC VISUAL V6.2 - THEME FOOTER ISOLATION + FLOW FIX
   Corrige el caso donde el footer/contenido del theme se veía detrás del editor.
   También neutraliza reglas viejas de display:contents/sticky que rompían la altura real.
   ========================================================= */

.jgpc-page-shell,
.jgpc-page-shell * {
  box-sizing: border-box !important;
}

.jgpc-page-shell {
  display: flow-root !important;
  clear: both !important;
  width: 100% !important;
  max-width: none !important;
  position: relative !important;
  z-index: 10 !important;
  isolation: isolate !important;
  overflow: visible !important;
  background: linear-gradient(180deg, #ffffff 0%, #fbfbff 55%, #ffffff 100%) !important;
  padding: 0 0 clamp(72px, 8vw, 130px) !important;
  margin: 0 auto clamp(36px, 5vw, 78px) !important;
}

.jgpc-page-shell::after {
  content: "" !important;
  display: block !important;
  clear: both !important;
  height: 1px !important;
}

.jgpc-page-shell .jgpc-builder {
  display: flow-root !important;
  clear: both !important;
  position: relative !important;
  z-index: 20 !important;
  isolation: isolate !important;
  overflow: visible !important;
  min-height: 1px !important;
  margin-bottom: 0 !important;
}

.jgpc-page-shell .jgpc-builder__grid,
.jgpc-page-shell .jgpc-preview-shell,
.jgpc-page-shell .jgpc-builder__panel,
.jgpc-page-shell .jgpc-panel-stack,
.jgpc-page-shell .jgpc-form,
.jgpc-page-shell .jgpc-step,
.jgpc-page-shell .jgpc-section,
.jgpc-page-shell .jgpc-inline-editor-bar,
.jgpc-page-shell .jgpc-stage-wrap {
  position: relative !important;
  z-index: 1 !important;
  max-height: none !important;
}

/* Este era el culpable más probable en móvil: display:contents elimina la caja real del CTA. */
.jgpc-page-shell .jgpc-step--buy {
  display: block !important;
  contain: none !important;
}

.jgpc-page-shell .jgpc-form__actions {
  display: block !important;
  position: static !important;
  inset: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

.jgpc-page-shell .jgpc-preview-shell {
  min-height: 1px !important;
}

.jgpc-page-shell .jgpc-inline-editor-bar {
  width: 100% !important;
  max-width: 760px !important;
  overflow: hidden !important;
}

.jgpc-page-shell .jgpc-inline-editor-mode--text .jgpc-inline-editor-textrow,
.jgpc-page-shell .jgpc-inline-editor-mode--image .jgpc-inline-editor-actions,
.jgpc-page-shell .jgpc-inline-editor-mode--text .jgpc-inline-editor-actions,
.jgpc-page-shell .jgpc-inline-editor-controls {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

.jgpc-page-shell .jgpc-inline-editor-mode--text .jgpc-inline-editor-textrow > *,
.jgpc-page-shell .jgpc-inline-editor-mode--image .jgpc-inline-editor-actions > *,
.jgpc-page-shell .jgpc-inline-editor-mode--text .jgpc-inline-editor-actions > *,
.jgpc-page-shell .jgpc-inline-editor-controls > * {
  min-width: 0 !important;
  max-width: 100% !important;
}

/* Mantiene el footer del theme por debajo del bloque del personalizador. */
body:has(.jgpc-page-shell) footer,
body:has(.jgpc-page-shell) .wp-site-blocks > footer,
body:has(.jgpc-page-shell) footer.wp-block-template-part,
body:has(.jgpc-page-shell) .wp-block-template-part:has(footer) {
  clear: both !important;
  position: relative !important;
  z-index: 0 !important;
  margin-top: clamp(42px, 6vw, 96px) !important;
}

body:has(.jgpc-page-shell) .wp-site-blocks,
body:has(.jgpc-page-shell) main,
body:has(.jgpc-page-shell) .entry-content,
body:has(.jgpc-page-shell) .wp-block-post-content {
  overflow: visible !important;
}

@media (min-width: 1051px) {
  .jgpc-page-shell {
    padding-top: 10px !important;
  }

  .jgpc-page-shell .jgpc-builder {
    padding-bottom: 34px !important;
  }

  .jgpc-page-shell .jgpc-builder__grid {
    align-items: start !important;
  }

  .jgpc-page-shell .jgpc-preview-shell {
    position: relative !important;
    top: auto !important;
    overflow: visible !important;
  }

  .jgpc-page-shell .jgpc-builder__panel {
    position: sticky !important;
    top: 18px !important;
    align-self: start !important;
  }

  .jgpc-page-shell .jgpc-inline-editor-mode--text .jgpc-inline-editor-textrow {
    display: grid !important;
    grid-template-columns: minmax(150px, 1.2fr) minmax(130px, .9fr) 78px minmax(104px, .8fr) minmax(104px, .8fr) !important;
    gap: 9px !important;
  }

  .jgpc-page-shell .jgpc-inline-editor-mode--text .jgpc-mini-check,
  .jgpc-page-shell .jgpc-inline-editor-mode--text .jgpc-color-pill,
  .jgpc-page-shell .jgpc-inline-editor-mode--text input[type="number"] {
    min-height: 42px !important;
  }

  .jgpc-page-shell .jgpc-inline-editor-mode--text .jgpc-inline-editor-actions {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 769px) and (max-width: 1050px) {
  .jgpc-page-shell {
    padding-bottom: 96px !important;
  }

  .jgpc-page-shell .jgpc-builder__panel,
  .jgpc-page-shell .jgpc-preview-shell,
  .jgpc-page-shell .jgpc-step--buy {
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
  }
}

@media (max-width: 768px) {
  .jgpc-page-shell {
    overflow: hidden !important;
    padding: 0 0 calc(120px + env(safe-area-inset-bottom)) !important;
    margin-bottom: 48px !important;
    background: linear-gradient(180deg, #ffffff 0%, #fbfbff 58%, #ffffff 100%) !important;
  }

  .jgpc-page-shell .jgpc-builder {
    padding-bottom: 22px !important;
  }

  .jgpc-page-shell .jgpc-builder__grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-areas: "preview" "panel" !important;
    gap: 12px !important;
    overflow: visible !important;
  }

  .jgpc-page-shell .jgpc-preview-shell,
  .jgpc-page-shell .jgpc-builder__panel {
    grid-area: auto !important;
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    z-index: 2 !important;
  }

  .jgpc-page-shell .jgpc-preview-shell {
    grid-row: 1 !important;
  }

  .jgpc-page-shell .jgpc-builder__panel {
    grid-row: 2 !important;
    margin-top: 0 !important;
  }

  .jgpc-page-shell .jgpc-inline-editor-bar {
    overflow: hidden !important;
    margin-bottom: 10px !important;
  }

  .jgpc-page-shell .jgpc-step--variant,
  .jgpc-page-shell .jgpc-step--buy {
    display: block !important;
    width: 100% !important;
    max-width: 520px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    z-index: 3 !important;
  }

  .jgpc-page-shell .jgpc-step--buy {
    margin-top: 10px !important;
    padding: 10px !important;
    box-shadow: 0 14px 34px rgba(109, 40, 217, .14) !important;
  }

  .jgpc-page-shell .jgpc-step--buy .jgpc-step__head {
    display: none !important;
  }

  .jgpc-page-shell .jgpc-mobile-buybar {
    display: grid !important;
    grid-template-columns: minmax(108px, .78fr) minmax(168px, 1.22fr) !important;
    gap: 9px !important;
    align-items: center !important;
  }

  .jgpc-page-shell .jgpc-mobile-buybar__price {
    font-size: clamp(27px, 7vw, 32px) !important;
    line-height: .88 !important;
    letter-spacing: -.035em !important;
  }

  .jgpc-page-shell .jgpc-mobile-buybar__variant,
  .jgpc-page-shell .jgpc-mobile-buybar__stock {
    font-size: 10.5px !important;
    line-height: 1.12 !important;
  }

  .jgpc-page-shell .jgpc-submit {
    min-height: 46px !important;
    line-height: 1.05 !important;
    white-space: normal !important;
  }

  body:has(.jgpc-page-shell) footer,
  body:has(.jgpc-page-shell) .wp-site-blocks > footer,
  body:has(.jgpc-page-shell) footer.wp-block-template-part,
  body:has(.jgpc-page-shell) .wp-block-template-part:has(footer) {
    margin-top: 58px !important;
    z-index: 0 !important;
  }
}

@media (max-width: 430px) {
  .jgpc-page-shell .jgpc-mobile-buybar {
    grid-template-columns: minmax(96px, .72fr) minmax(154px, 1.28fr) !important;
    gap: 8px !important;
  }

  .jgpc-page-shell .jgpc-mobile-buybar__price {
    font-size: 28px !important;
  }

  .jgpc-page-shell .jgpc-submit {
    font-size: 15.5px !important;
    padding: 8px 10px !important;
  }
}

@media (max-width: 360px) {
  .jgpc-page-shell .jgpc-mobile-buybar {
    grid-template-columns: 1fr !important;
  }

  .jgpc-page-shell .jgpc-mobile-buybar__meta {
    text-align: center !important;
  }
}


/* === JGPC V6.3 TABLET + MOBILE FINISH === */
.jgpc-page-shell {
  position: relative !important;
  isolation: isolate !important;
  clear: both !important;
}

.jgpc-page-shell .jgpc-builder,
.jgpc-page-shell .jgpc-builder__grid,
.jgpc-page-shell .jgpc-preview-shell,
.jgpc-page-shell .jgpc-builder__panel,
.jgpc-page-shell .jgpc-inline-editor-bar {
  overflow: visible !important;
}

.jgpc-page-shell .jgpc-inline-editor-bar {
  position: relative !important;
  top: auto !important;
  bottom: auto !important;
  max-height: none !important;
  height: auto !important;
  margin-top: 10px !important;
}

.jgpc-page-shell .jgpc-mobile-buybar__price,
.jgpc-page-shell .jgpc-price {
  font-family: 'Bebas Neue', Impact, sans-serif !important;
  color: #6d3df2 !important;
  letter-spacing: .01em !important;
  line-height: .92 !important;
}

.jgpc-page-shell .jgpc-step--buy {
  overflow: visible !important;
}

.jgpc-page-shell .jgpc-mobile-buybar {
  border-radius: 18px !important;
}

.jgpc-page-shell .jgpc-mobile-buybar__meta {
  min-width: 0 !important;
}

.jgpc-page-shell .jgpc-mobile-buybar__variant,
.jgpc-page-shell .jgpc-mobile-buybar__stock {
  font-size: 11px !important;
  line-height: 1.18 !important;
  color: #64748b !important;
}

@media (max-width: 1050px) {
  .jgpc-page-shell {
    padding: 0 0 calc(28px + env(safe-area-inset-bottom)) !important;
    margin-bottom: 28px !important;
  }

  .jgpc-page-shell .jgpc-builder {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }

  .jgpc-page-shell .jgpc-builder__grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "preview"
      "panel" !important;
    gap: 12px !important;
    align-items: start !important;
  }

  .jgpc-page-shell .jgpc-preview-shell,
  .jgpc-page-shell .jgpc-builder__panel {
    grid-column: auto !important;
    width: 100% !important;
    max-width: 860px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
  }

  .jgpc-page-shell .jgpc-preview-shell {
    grid-row: 1 !important;
    padding: 10px !important;
  }

  .jgpc-page-shell .jgpc-builder__panel {
    grid-row: 2 !important;
    min-width: 0 !important;
    padding: 10px !important;
  }

  .jgpc-page-shell .jgpc-stage-wrap {
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 10px !important;
    overflow: visible !important;
    box-shadow: none !important;
  }

  .jgpc-page-shell .jgpc-stage {
    width: min(100%, 360px) !important;
    max-width: 100% !important;
    max-height: none !important;
    margin: 0 auto !important;
  }

  .jgpc-page-shell .jgpc-inline-editor-mode--image .jgpc-inline-editor-actions,
  .jgpc-page-shell .jgpc-inline-editor-mode--text .jgpc-inline-editor-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .jgpc-page-shell .jgpc-inline-editor-controls {
    display: grid !important;
    gap: 10px !important;
  }

  .jgpc-page-shell .jgpc-inline-editor-controls .jgpc-control-range {
    width: 100% !important;
  }

  .jgpc-page-shell .jgpc-step--buy {
    position: static !important;
    bottom: auto !important;
    margin-top: 10px !important;
    padding: 10px !important;
  }

  .jgpc-page-shell .jgpc-form__actions {
    position: static !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
  }

  .jgpc-page-shell .jgpc-mobile-buybar {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding: 14px !important;
    border: 1px solid var(--jgpc-border) !important;
    background: #fff !important;
    box-shadow: 0 12px 24px rgba(109, 61, 242, 0.10) !important;
  }

  .jgpc-page-shell .jgpc-mobile-buybar__price {
    font-size: clamp(34px, 7vw, 44px) !important;
  }

  .jgpc-page-shell .jgpc-submit {
    min-height: 48px !important;
    height: auto !important;
    border-radius: 14px !important;
    font-size: 15px !important;
    line-height: 1.05 !important;
    white-space: normal !important;
  }
}

@media (min-width: 768px) and (max-width: 1050px) {
  .jgpc-page-shell {
    padding-bottom: 20px !important;
    margin-bottom: 32px !important;
  }

  .jgpc-page-shell .jgpc-builder {
    width: min(100%, 920px) !important;
  }

  .jgpc-page-shell .jgpc-inline-editor-mode--text .jgpc-inline-editor-textrow {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .jgpc-page-shell .jgpc-inline-editor-textrow input[type="number"] {
    min-width: 0 !important;
  }
}

@media (max-width: 767px) {
  .jgpc-page-shell {
    padding-bottom: 18px !important;
    margin-bottom: 24px !important;
  }

  .jgpc-page-shell .jgpc-builder {
    padding: 0 10px !important;
  }

  .jgpc-page-shell .jgpc-canvas-topbar {
    position: relative !important;
    top: auto !important;
    z-index: 2 !important;
    padding: 0 !important;
  }

  .jgpc-page-shell .jgpc-inline-editor-mode--text .jgpc-inline-editor-textrow {
    grid-template-columns: 1fr !important;
  }

  .jgpc-page-shell .jgpc-inline-editor-bar {
    padding: 10px !important;
    border-radius: 18px !important;
    margin-bottom: 10px !important;
  }

  .jgpc-page-shell .jgpc-mobile-buybar__price {
    font-size: 32px !important;
  }

  .jgpc-page-shell .jgpc-mobile-buybar__variant,
  .jgpc-page-shell .jgpc-mobile-buybar__stock {
    font-size: 10.5px !important;
  }
}

@media (min-width: 1051px) {
  .jgpc-page-shell .jgpc-mobile-buybar__price {
    font-size: clamp(38px, 2.8vw, 52px) !important;
  }

  .jgpc-page-shell .jgpc-mobile-buybar {
    grid-template-columns: minmax(0, 1fr) minmax(210px, 280px) !important;
    gap: 14px !important;
  }
}
/* =========================================================
   JGPC FIX FINAL MANUAL - TABLET / MOBILE / FOOTER / PRECIO
   Pegar al final de frontend.css.
   Objetivo:
   - Quitar alturas 100dvh que hacen que el footer se meta.
   - Desactivar sticky problemático del editor y CTA.
   - Forzar tablet a layout estable de una columna.
   - Evitar recortes del panel de herramientas.
   - Compactar espacio entre botones y canvas.
   - Mejorar tarjeta de compra y precio.
   ========================================================= */

/* 1) Base: el personalizador debe empujar el contenido y footer, no flotar encima */
.jgpc-page-shell,
.jgpc-builder {
  display: block !important;
  width: 100% !important;
  clear: both !important;
  position: relative !important;
  isolation: isolate !important;
  overflow: visible !important;
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
  box-sizing: border-box !important;
}

.jgpc-page-shell {
  z-index: 10 !important;
  padding-bottom: 32px !important;
  margin-bottom: 36px !important;
  background: linear-gradient(180deg, #ffffff 0%, #fbfbff 58%, #ffffff 100%) !important;
}

.jgpc-page-shell::after,
.jgpc-builder::after {
  content: "" !important;
  display: block !important;
  clear: both !important;
  height: 1px !important;
}

/* 2) Neutralizar reglas viejas que estaban recortando el editor */
.jgpc-builder__grid,
.jgpc-preview-shell,
.jgpc-builder__panel,
.jgpc-panel-stack,
.jgpc-form,
.jgpc-stage-wrap,
.jgpc-inline-editor-bar,
.jgpc-step,
.jgpc-section,
.jgpc-step--variant,
.jgpc-step--buy {
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
  overflow: visible !important;
}

/* 3) Desactivar sticky problemático. 
   Esto es clave: primero estabilidad, luego si quieres hacemos CTA sticky bien separado. */
.jgpc-preview-shell,
.jgpc-builder__panel,
.jgpc-stage-wrap,
.jgpc-inline-editor-bar,
.jgpc-form__actions,
.jgpc-step--buy,
.jgpc-canvas-topbar {
  position: relative !important;
  top: auto !important;
  bottom: auto !important;
  left: auto !important;
  right: auto !important;
}

/* 4) Layout general limpio */
.jgpc-builder {
  width: min(100%, 1320px) !important;
  max-width: 1320px !important;
  margin: 18px auto 34px !important;
  padding: 0 14px !important;
}

.jgpc-builder__grid {
  display: grid !important;
  align-items: start !important;
  gap: 20px !important;
}

.jgpc-preview-shell,
.jgpc-builder__panel {
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

/* 5) Editor: reducir espacio innecesario entre toolbar y canvas */
.jgpc-studio-header {
  margin-bottom: 10px !important;
}

.jgpc-canvas-topbar {
  display: grid !important;
  gap: 10px !important;
  padding: 0 !important;
  margin: 0 0 12px !important;
  background: transparent !important;
  z-index: 2 !important;
}

.jgpc-canvas-topbar .jgpc-tool-btn,
.jgpc-canvas-topbar__btn {
  min-height: 44px !important;
  height: 44px !important;
  border-radius: 14px !important;
}

/* 6) Canvas: sin min-height forzado gigante */
.jgpc-stage-wrap {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-top: 0 !important;
  padding: 12px !important;
  border-radius: 22px !important;
  background: radial-gradient(circle at top, rgba(124, 58, 237, .055), transparent 38%), #fff !important;
}

.jgpc-stage {
  display: block !important;
  margin: 0 auto !important;
  max-width: 100% !important;
  max-height: none !important;
  overflow: hidden !important;
}

/* 7) Panel contextual: no cortar la parte final */
.jgpc-inline-editor-bar {
  display: grid !important;
  gap: 10px !important;
  margin: 10px 0 14px !important;
  padding: 12px !important;
  border-radius: 20px !important;
  background: rgba(255,255,255,.98) !important;
  border: 1px solid rgba(148,163,184,.20) !important;
  box-shadow: 0 12px 30px rgba(15,23,42,.08) !important;
  z-index: 3 !important;
}

.jgpc-inline-editor-mode {
  min-width: 0 !important;
}

.jgpc-inline-editor-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

.jgpc-inline-editor-actions .jgpc-tool-btn {
  min-width: 0 !important;
  min-height: 42px !important;
  height: auto !important;
  border-radius: 13px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.jgpc-inline-editor-controls {
  display: grid !important;
  gap: 10px !important;
  width: 100% !important;
}

.jgpc-control-range {
  display: grid !important;
  grid-template-columns: 70px minmax(0, 1fr) 48px !important;
  gap: 10px !important;
  align-items: center !important;
  width: 100% !important;
}

.jgpc-control-range span {
  font-size: 11px !important;
  line-height: 1.1 !important;
  text-transform: uppercase !important;
  letter-spacing: .04em !important;
  color: #64748b !important;
  font-weight: 900 !important;
}

.jgpc-control-range input[type="range"] {
  width: 100% !important;
  min-width: 0 !important;
}

.jgpc-control-range b {
  text-align: right !important;
  font-size: 12px !important;
  color: #64748b !important;
}

/* 8) Panel de texto: que no se desborde */
.jgpc-inline-editor-mode--text .jgpc-inline-editor-textrow {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 9px !important;
  align-items: stretch !important;
}

.jgpc-inline-editor-mode--text .jgpc-inline-editor-textrow > * {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

.jgpc-inline-editor-mode--text .jgpc-inline-editor-textrow input[type="text"],
.jgpc-inline-editor-mode--text .jgpc-inline-editor-textrow select {
  grid-column: span 2 !important;
}

.jgpc-inline-editor-textrow input[type="text"],
.jgpc-inline-editor-textrow input[type="number"],
.jgpc-inline-editor-textrow select,
.jgpc-color-pill,
.jgpc-mini-check {
  min-height: 42px !important;
  height: auto !important;
  border-radius: 13px !important;
}

/* 9) Tarjeta de compra y precio: más ecommerce, menos raro */
.jgpc-step--buy {
  display: block !important;
  padding: 14px !important;
  border-radius: 22px !important;
  background: #fff !important;
  border: 1px solid rgba(148,163,184,.22) !important;
  box-shadow: 0 16px 34px rgba(109,61,242,.10) !important;
}

.jgpc-step--buy .jgpc-step__head {
  margin-bottom: 10px !important;
}

.jgpc-mobile-buybar {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 12px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.jgpc-mobile-buybar__meta {
  display: grid !important;
  gap: 3px !important;
  min-width: 0 !important;
}

.jgpc-mobile-buybar__price,
.jgpc-price {
  display: block !important;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-weight: 800 !important;
  color: #6d3df2 !important;
  line-height: .94 !important;
  letter-spacing: -.035em !important;
}

.jgpc-mobile-buybar__price {
  font-size: clamp(34px, 7vw, 46px) !important;
}

.jgpc-mobile-buybar__variant,
.jgpc-mobile-buybar__stock {
  display: block !important;
  max-width: 100% !important;
  color: #64748b !important;
  font-size: 11.5px !important;
  font-weight: 800 !important;
  line-height: 1.18 !important;
}

.jgpc-submit {
  min-height: 52px !important;
  height: auto !important;
  width: 100% !important;
  border-radius: 16px !important;
  font-family: "Bebas Neue", Impact, sans-serif !important;
  font-size: 18px !important;
  letter-spacing: .025em !important;
  line-height: 1 !important;
  padding: 12px 16px !important;
  background: linear-gradient(135deg, #8b5cf6 0%, #5b21b6 100%) !important;
  box-shadow: 0 14px 26px rgba(93,47,225,.24) !important;
}

/* 10) Desktop real */
@media (min-width: 1100px) {
  .jgpc-builder__grid {
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr) !important;
    gap: 24px !important;
  }

  .jgpc-builder__panel {
    max-width: 360px !important;
  }

  .jgpc-preview-shell {
    max-width: none !important;
    padding: 18px !important;
  }

  .jgpc-stage {
    width: min(100%, 600px) !important;
  }

  .jgpc-inline-editor-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  .jgpc-inline-editor-mode--text .jgpc-inline-editor-actions {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }

  .jgpc-inline-editor-mode--text .jgpc-inline-editor-textrow {
    grid-template-columns: minmax(150px, 1.25fr) minmax(130px, 1fr) 78px minmax(120px, .9fr) minmax(120px, .9fr) !important;
  }

  .jgpc-inline-editor-mode--text .jgpc-inline-editor-textrow input[type="text"],
  .jgpc-inline-editor-mode--text .jgpc-inline-editor-textrow select {
    grid-column: auto !important;
  }
}

/* 11) Tablet: forzar una columna estable */
@media (min-width: 768px) and (max-width: 1099px) {
  .jgpc-builder {
    width: min(100%, 880px) !important;
    max-width: 880px !important;
    padding: 0 16px !important;
  }

  .jgpc-builder__grid {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "preview"
      "panel" !important;
    gap: 16px !important;
  }

  .jgpc-preview-shell,
  .jgpc-builder__panel {
    grid-column: auto !important;
    width: 100% !important;
    max-width: 760px !important;
    min-width: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .jgpc-preview-shell {
    grid-row: 1 !important;
    padding: 14px !important;
  }

  .jgpc-builder__panel {
    grid-row: 2 !important;
    padding: 12px !important;
  }

  .jgpc-canvas-topbar {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .jgpc-stage {
    width: min(100%, 430px) !important;
  }

  .jgpc-panel-stack {
    display: grid !important;
    gap: 12px !important;
    padding-bottom: 0 !important;
  }

  .jgpc-selector-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .jgpc-selector-block--brand,
  .jgpc-selector-block--stock {
    grid-column: span 2 !important;
  }
}

/* 12) Móvil */
@media (max-width: 767px) {
  .jgpc-page-shell {
    padding-bottom: 24px !important;
    margin-bottom: 28px !important;
  }

  .jgpc-builder {
    width: 100% !important;
    padding: 0 10px !important;
    margin-top: 10px !important;
  }

  .jgpc-builder__grid {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "preview"
      "panel" !important;
    gap: 10px !important;
  }

  .jgpc-preview-shell,
  .jgpc-builder__panel {
    grid-column: auto !important;
    width: 100% !important;
    max-width: 540px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .jgpc-preview-shell {
    grid-row: 1 !important;
    padding: 10px !important;
  }

  .jgpc-builder__panel {
    grid-row: 2 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  .jgpc-studio-header {
    margin-bottom: 8px !important;
  }

  .jgpc-canvas-topbar {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
    margin-bottom: 8px !important;
  }

  .jgpc-canvas-topbar .jgpc-tool-btn,
  .jgpc-canvas-topbar__btn {
    min-height: 40px !important;
    height: 40px !important;
    border-radius: 13px !important;
    font-size: 12px !important;
    padding: 8px 6px !important;
  }

  .jgpc-stage-wrap {
    padding: 10px !important;
    border-radius: 20px !important;
  }

  .jgpc-stage {
    width: min(100%, 340px) !important;
  }

  .jgpc-inline-editor-bar {
    margin-top: 8px !important;
    padding: 10px !important;
    border-radius: 18px !important;
  }

  .jgpc-inline-editor-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .jgpc-inline-editor-mode--text .jgpc-inline-editor-textrow {
    grid-template-columns: 1fr !important;
  }

  .jgpc-inline-editor-mode--text .jgpc-inline-editor-textrow input[type="text"],
  .jgpc-inline-editor-mode--text .jgpc-inline-editor-textrow select {
    grid-column: auto !important;
  }

  .jgpc-control-range {
    grid-template-columns: 68px minmax(0, 1fr) 42px !important;
    gap: 8px !important;
  }

  .jgpc-panel-stack {
    display: grid !important;
    gap: 10px !important;
    padding-bottom: 0 !important;
    overflow: visible !important;
  }

  .jgpc-step--variant,
  .jgpc-step--buy {
    margin: 0 !important;
  }

  .jgpc-step--buy {
    padding: 12px !important;
  }

  .jgpc-mobile-buybar__price {
    font-size: 32px !important;
  }

  .jgpc-submit {
    min-height: 48px !important;
    font-size: 17px !important;
  }
}

@media (max-width: 390px) {
  .jgpc-builder {
    padding: 0 8px !important;
  }

  .jgpc-canvas-topbar .jgpc-tool-btn,
  .jgpc-canvas-topbar__btn {
    font-size: 11px !important;
  }

  .jgpc-stage {
    width: min(100%, 310px) !important;
  }

  .jgpc-mobile-buybar__price {
    font-size: 30px !important;
  }
}

/* 13) Footer/theme: mantenerlo debajo */
body:has(.jgpc-page-shell) footer,
body:has(.jgpc-page-shell) .wp-site-blocks > footer,
body:has(.jgpc-page-shell) footer.wp-block-template-part,
body:has(.jgpc-page-shell) .wp-block-template-part:has(footer) {
  clear: both !important;
  position: relative !important;
  z-index: 0 !important;
  margin-top: 48px !important;
}

body:has(.jgpc-page-shell) main,
body:has(.jgpc-page-shell) .entry-content,
body:has(.jgpc-page-shell) .wp-block-post-content,
body:has(.jgpc-page-shell) .elementor-widget-container {
  overflow: visible !important;
}
/* === FIX FINAL: precio encimado con botón en escritorio === */
@media (min-width: 1100px) {
  .jgpc-page-shell .jgpc-step--buy {
    padding: 16px !important;
  }

  .jgpc-page-shell .jgpc-mobile-buybar {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    align-items: stretch !important;
  }

  .jgpc-page-shell .jgpc-mobile-buybar__meta {
    display: grid !important;
    gap: 4px !important;
  }

  .jgpc-page-shell .jgpc-mobile-buybar__price {
    font-size: 42px !important;
    line-height: 0.95 !important;
    margin: 0 0 6px 0 !important;
    white-space: nowrap !important;
  }

  .jgpc-page-shell .jgpc-submit {
    position: relative !important;
    z-index: 2 !important;
    width: 100% !important;
    min-height: 52px !important;
    margin-top: 4px !important;
  }
}
/* === FIX FINAL: precio + botón en tablet grande y desktop angosto === */
@media (min-width: 768px) {
  .jgpc-page-shell .jgpc-step--buy {
    padding: 16px !important;
    overflow: visible !important;
  }

  .jgpc-page-shell .jgpc-mobile-buybar {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    align-items: stretch !important;
  }

  .jgpc-page-shell .jgpc-mobile-buybar__meta {
    display: grid !important;
    gap: 4px !important;
    min-width: 0 !important;
  }

  .jgpc-page-shell .jgpc-mobile-buybar__price {
    display: block !important;
    font-size: clamp(34px, 3.4vw, 42px) !important;
    line-height: .92 !important;
    margin: 0 0 8px 0 !important;
    white-space: nowrap !important;
    position: relative !important;
    z-index: 1 !important;
  }

  .jgpc-page-shell .jgpc-mobile-buybar__variant,
  .jgpc-page-shell .jgpc-mobile-buybar__stock {
    position: relative !important;
    z-index: 1 !important;
  }

  .jgpc-page-shell .jgpc-submit {
    position: relative !important;
    z-index: 2 !important;
    width: 100% !important;
    min-height: 52px !important;
    height: auto !important;
    margin-top: 2px !important;
  }
}

/* Franja delicada: tablet horizontal / laptop chica */
@media (min-width: 900px) and (max-width: 1299px) {
  .jgpc-page-shell .jgpc-mobile-buybar__price {
    font-size: 36px !important;
  }

  .jgpc-page-shell .jgpc-submit {
    font-size: 16px !important;
    min-height: 50px !important;
  }
}

/* Escritorio real */
@media (min-width: 1300px) {
  .jgpc-page-shell .jgpc-mobile-buybar__price {
    font-size: 42px !important;
  }
}