/* ============================================
   CARD NO GRID DE PRODUTOS
   ============================================ */
.custom-order-card {
  position: relative;
  background: linear-gradient(180deg, #fff 0%, #fffafc 100%);
  border: 1px solid rgba(232, 82, 122, .22);
  box-shadow: 0 4px 12px rgba(232, 82, 122, .06);
}
.custom-order-card .product-img-container {
  background: var(--bg-2);
}

.custom-order-card-image-wrap { outline: none; }
.custom-order-card-image-wrap:focus-visible {
  box-shadow: inset 0 0 0 3px var(--primary-soft);
}

.custom-order-card-image {
  filter: saturate(.96);
}

.custom-order-badge {
  color: var(--primary);
  background: var(--primary-soft);
  border-color: rgba(232, 82, 122, .22);
}

.custom-order-card .custom-order-card-title {
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.3;
  -webkit-line-clamp: 2;
  min-height: 2.1em;
}

.custom-order-card-description {
  color: var(--text-dim);
  font-size: .68rem;
  line-height: 1.35;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.custom-order-card-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-top: 2px;
}
.custom-order-card-price {
  font-size: .82rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.custom-order-card-price-extra {
  font-size: .62rem;
  color: var(--text-mute);
  font-weight: 500;
  line-height: 1.2;
}

.custom-order-card .custom-order-card-button {
  background: var(--primary);
  color: #fff;
  min-height: 32px;
  padding: 7px 10px;
  font-size: .74rem;
}

.custom-order-card-trust {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-mute);
  font-size: .6rem;
  font-weight: 500;
  line-height: 1.2;
  margin-top: 2px;
}
.custom-order-card-trust-icon {
  width: 14px;
  height: 14px;
  display: inline-grid;
  place-items: center;
  color: #25d366;
}
.custom-order-card-trust-icon svg { width: 12px; height: 12px; }

/* --- Variante: busca sem resultado --- */
.custom-order-card-no-results {
  grid-column: 1 / -1;
  max-width: 380px;
  justify-self: center;
  width: 100%;
  border-style: solid;
  border-color: rgba(232, 82, 122, .35);
  box-shadow: 0 8px 22px rgba(232, 82, 122, .12);
}
.custom-order-card-no-results .custom-order-badge {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.custom-order-card-no-results .custom-order-card-title {
  font-size: .86rem;
  -webkit-line-clamp: 2;
}
.custom-order-card-no-results .custom-order-card-description {
  -webkit-line-clamp: 2;
  font-size: .72rem;
}

/* ============================================
   MODAL
   ============================================ */
.custom-order-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2600;
  background: rgba(3, 1, 12, .72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: flex-start;
  justify-content: center;
  padding: 14px 10px 28px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.custom-order-modal.active { display: flex; animation: co-fade .18s ease-out; }

@keyframes co-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.custom-order-modal-content {
  width: 100%;
  max-width: 460px;
  background: var(--bg-1);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2);
  padding: 16px 14px 18px;
  position: relative;
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
  animation: co-pop .22s cubic-bezier(.2, .9, .3, 1.1);
}
@keyframes co-pop {
  from { transform: translateY(8px) scale(.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.custom-order-close {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(20, 10, 50, .06);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transition: background .2s ease, transform .2s ease;
  border: none;
}
.custom-order-close:hover { background: rgba(20, 10, 50, .14); transform: rotate(90deg); }
.custom-order-close svg { display: block; }

/* ============================================
   HEADER DO MODAL
   ============================================ */
.custom-order-header {
  padding-right: 40px;
  margin-bottom: 12px;
}

.custom-order-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: var(--radius-pill);
  padding: 4px 10px 4px 8px;
  font-size: .66rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.custom-order-kicker svg { flex-shrink: 0; }

.custom-order-header h3,
.custom-order-status h3 {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.01em;
}

.custom-order-header p,
.custom-order-status p,
.custom-order-upsell p {
  color: var(--text-dim);
  margin: 0;
  font-size: .8rem;
  line-height: 1.5;
}
.custom-order-header strong { color: var(--text); }

.custom-order-amount {
  display: inline-block;
  margin-top: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 800;
  font-size: 1.15rem;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  letter-spacing: -.01em;
}

.custom-order-payment-summary {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  background: var(--primary-soft);
  color: var(--primary);
}
.custom-order-payment-summary span {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.custom-order-payment-summary strong {
  font-size: 1.08rem;
  line-height: 1;
}

/* Indicador de etapas */
.custom-order-steps {
  display: flex;
  gap: 3px;
  margin-bottom: 14px;
  font-size: .58rem;
  font-weight: 600;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.custom-order-steps span {
  flex: 1;
  padding: 5px 4px 0;
  border-top: 2px solid var(--border-strong);
  text-align: center;
  line-height: 1.2;
}
.custom-order-steps span.active {
  color: var(--primary);
  border-top-color: var(--primary);
}

/* ============================================
   BLOCKS / STEPS NO FORMULÁRIO
   ============================================ */
.custom-order-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.custom-order-block {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.custom-order-block-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  font-weight: 700;
  color: var(--text);
}
.custom-order-block-head small {
  color: var(--text-mute);
  font-size: .68rem;
  font-weight: 600;
}
.co-step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: .7rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.custom-order-block-hint {
  margin: -2px 0 2px;
  color: var(--text-dim);
  font-size: .72rem;
  line-height: 1.45;
}
.custom-order-block-hint strong { color: var(--text); font-weight: 600; }

.custom-order-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.custom-order-field label,
.custom-order-field-label {
  font-size: .76rem;
  color: var(--text);
  font-weight: 600;
}

.custom-order-help {
  color: var(--text-mute);
  font-size: .66rem;
  line-height: 1.4;
}

.custom-order-input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: var(--bg-2);
  color: var(--text);
  font: inherit;
  font-size: .9rem;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.custom-order-input::placeholder { color: var(--text-mute); }
.custom-order-input:hover { background: #fff; }
.custom-order-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
  background: #fff;
  outline: none;
}
.custom-order-input.error {
  border-color: #d92d20;
  background: rgba(217, 45, 32, .04);
  box-shadow: 0 0 0 3px rgba(217, 45, 32, .08);
}
.custom-order-input:disabled {
  background: var(--bg-2);
  opacity: .7;
  cursor: not-allowed;
}

textarea.custom-order-input {
  min-height: 76px;
  resize: vertical;
}

/* --- Choice grid (formato / pagamento) --- */
.custom-order-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.custom-order-choice-grid .co-choice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-2);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.custom-order-choice-grid .co-choice:hover {
  background: #fff;
  border-color: rgba(232, 82, 122, .35);
}
.custom-order-choice-grid .co-choice input {
  margin-top: 3px;
  accent-color: var(--primary);
  flex-shrink: 0;
}
.custom-order-choice-grid .co-choice-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.25;
}
.custom-order-choice-grid .co-choice-body strong {
  color: var(--text);
  font-size: .82rem;
  font-weight: 600;
}
.custom-order-choice-grid .co-choice-body small {
  color: var(--text-mute);
  font-size: .66rem;
  line-height: 1.3;
}
.custom-order-choice-grid .co-choice:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.custom-order-choice-grid .co-choice:has(input:checked) .co-choice-body strong {
  color: var(--primary);
}

/* ============================================
   MOLD PICKER (grid de cards visuais)
   ============================================ */
.co-selected-mold {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-2);
}
.co-selected-mold-empty {
  grid-template-columns: 1fr;
  align-items: stretch;
}
.co-selected-mold strong {
  display: block;
  color: var(--text);
  font-size: .88rem;
  line-height: 1.25;
}
.co-selected-mold small {
  display: block;
  color: var(--text-dim);
  font-size: .72rem;
  line-height: 1.35;
  margin-top: 2px;
}
.co-selected-mold-img {
  width: 48px;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.co-selected-mold-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.co-mold-picker {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.co-mold-grid-count {
  display: block;
  font-size: .66rem;
  color: var(--text-mute);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin: -2px 0 6px;
}

.co-mold-grid-wrap {
  position: relative;
  border-radius: var(--radius);
}
.co-mold-grid-wrap.has-overflow::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 8px;
  bottom: 0;
  height: 28px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--bg-1) 85%);
  border-radius: 0 0 var(--radius) var(--radius);
  pointer-events: none;
}

.co-mold-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  max-height: 268px;
  overflow-y: auto;
  padding: 2px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
  border-radius: var(--radius);
}
.co-mold-picker-grid {
  max-height: min(48dvh, 360px);
}
.co-mold-grid::-webkit-scrollbar { width: 6px; }
.co-mold-grid::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 6px;
}

.co-mold-tile {
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  border: 1.5px solid var(--border-strong);
  border-radius: 14px;
  background: var(--bg-2);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
  text-align: left;
  font: inherit;
  color: var(--text);
  min-height: 60px;
}
.co-mold-tile:hover {
  border-color: rgba(232, 82, 122, .45);
  background: #fff;
}
.co-mold-tile:focus-visible {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.co-mold-tile.is-selected {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: 0 4px 12px rgba(232, 82, 122, .14);
}
.co-mold-tile-image {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
}
.co-mold-tile-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.co-mold-tile-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.co-mold-tile-body strong {
  font-size: .76rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.co-mold-tile-body small {
  font-size: .68rem;
  color: var(--text-mute);
  font-weight: 600;
}
.co-mold-tile.is-selected .co-mold-tile-body small { color: var(--primary); }
.co-mold-tile-check {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: .68rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(.6);
  transition: opacity .15s ease, transform .15s ease;
}
.co-mold-tile.is-selected .co-mold-tile-check {
  opacity: 1;
  transform: scale(1);
}

/* Tile "Digitar outro molde" */
.co-mold-tile-typed {
  border-style: dashed;
  background: linear-gradient(135deg, rgba(232, 82, 122, .05), transparent 70%);
}
.co-mold-tile-typed .co-mold-tile-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.co-mold-tile-typed.is-selected {
  border-style: solid;
}

.co-mold-empty-text {
  grid-column: 1 / -1;
  margin: 0;
  padding: 14px;
  text-align: center;
  color: var(--text-dim);
  font-size: .82rem;
  background: var(--bg-2);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
}

.co-custom-mold-box {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 12px;
  border: 1px solid rgba(232, 82, 122, .24);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(232, 82, 122, .06), #fff 76%);
}
.co-custom-mold-box strong {
  display: block;
  color: var(--text);
  font-size: .88rem;
}
.co-custom-mold-box small {
  display: block;
  color: var(--text-dim);
  font-size: .72rem;
  line-height: 1.4;
  margin-top: 2px;
}

/* ============================================
   TOGGLE: detalhes opcionais
   ============================================ */
.custom-order-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 12px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-dim);
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.custom-order-toggle:hover {
  background: var(--primary-soft);
  border-color: rgba(232, 82, 122, .35);
  color: var(--primary);
}
.custom-order-toggle .co-toggle-plus {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  transition: transform .2s ease;
  flex-shrink: 0;
}
.custom-order-toggle .co-toggle-text { flex: 1; text-align: left; }
.custom-order-toggle .co-toggle-chev {
  color: var(--text-mute);
  transition: transform .2s ease;
}
.custom-order-toggle.is-open {
  background: var(--primary-soft);
  border-color: rgba(232, 82, 122, .4);
  color: var(--primary);
  border-style: solid;
}
.custom-order-toggle.is-open .co-toggle-plus { transform: rotate(45deg); }
.custom-order-toggle.is-open .co-toggle-chev { transform: rotate(180deg); }

.custom-order-field-optional {
  margin-top: 2px;
}

/* Aviso amigavel (foto/logo) */
.custom-order-note {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  color: var(--text-dim);
  background: rgba(37, 211, 102, .06);
  border: 1px solid rgba(37, 211, 102, .22);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: .74rem;
  line-height: 1.45;
}
.custom-order-note-icon {
  flex-shrink: 0;
  color: #25d366;
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
}

.custom-order-two {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.custom-order-email-suggestion {
  width: fit-content;
  background: var(--primary-soft);
  border: none;
  color: var(--primary);
  font-size: .72rem;
  font-weight: 500;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  margin-top: 2px;
}
.custom-order-email-suggestion strong { font-weight: 700; }
.custom-order-email-suggestion:hover { background: rgba(232, 82, 122, .2); }

/* Resumo */
.custom-order-summary {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-2);
  padding: 11px 13px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.custom-order-summary-head {
  font-size: .66rem;
  font-weight: 700;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 2px;
}
.custom-order-summary div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: .78rem;
  color: var(--text-dim);
}
.custom-order-summary div.total {
  padding-top: 7px;
  border-top: 1px dashed var(--border);
  font-size: .92rem;
  color: var(--text);
}
.custom-order-summary strong {
  color: var(--text);
  font-weight: 700;
}
.custom-order-summary .total strong {
  font-size: 1.02rem;
  color: var(--primary);
}
.custom-order-summary small,
.custom-order-small {
  color: var(--text-mute);
  font-size: .68rem;
  line-height: 1.4;
}

/* Disclaimer */
.custom-order-disclaimer {
  margin: 0;
  font-size: .7rem;
  color: var(--text-mute);
  line-height: 1.5;
  text-align: center;
  padding: 0 4px;
}

/* Mensagens */
.custom-order-error {
  color: #b42d24;
  background: rgba(217, 45, 32, .08);
  border: 1px solid rgba(217, 45, 32, .2);
  border-radius: var(--radius);
  padding: 9px 11px;
  font-size: .78rem;
  line-height: 1.4;
}
.custom-order-error.is-success {
  color: #11784f;
  background: rgba(26, 168, 118, .1);
  border-color: rgba(26, 168, 118, .25);
}

/* Botoes */
.custom-order-primary,
.custom-order-secondary {
  width: 100%;
  min-height: 46px;
  border-radius: var(--radius-pill);
  padding: 12px 16px;
  cursor: pointer;
  font: inherit;
  font-size: .9rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
  border: none;
}
.custom-order-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 18px rgba(232, 82, 122, .28);
}
.custom-order-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(232, 82, 122, .38);
}
.custom-order-primary:disabled { opacity: .55; cursor: not-allowed; }
.custom-order-primary-arrow { transition: transform .2s ease; }
.custom-order-primary:hover .custom-order-primary-arrow { transform: translateX(3px); }
.custom-order-primary.saved { background: var(--success); box-shadow: 0 8px 22px rgba(26, 168, 118, .3); }

.custom-order-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.custom-order-secondary:hover:not(:disabled) { background: rgba(20, 10, 50, .04); }
.custom-order-secondary.copied,
.custom-order-secondary.saved { color: var(--success); border-color: rgba(26, 168, 118, .45); background: rgba(26, 168, 118, .08); }

.custom-order-payment-switch {
  width: 100%;
  min-height: 42px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(232, 82, 122, .35);
  background: var(--primary-soft);
  color: var(--primary);
  font: inherit;
  font-size: .84rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  transition: background .15s ease, transform .15s ease, border-color .15s ease;
}
.custom-order-payment-switch:hover {
  background: rgba(232, 82, 122, .16);
  border-color: rgba(232, 82, 122, .5);
  transform: translateY(-1px);
}

.custom-order-link {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: .8rem;
  font-weight: 600;
  padding: 8px 10px;
  cursor: pointer;
  width: 100%;
  text-align: center;
  margin-top: 6px;
}
.custom-order-link:hover { color: var(--primary); text-decoration: underline; }

/* Exit / "voltar pra loja": discreto, mas com sublinhado leve para ser fácil de achar */
.custom-order-exit-link {
  margin-top: 10px;
  color: var(--text-mute);
  font-size: .76rem;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(154, 122, 136, .35);
  text-decoration-thickness: 1px;
}
.custom-order-exit-link:hover {
  color: var(--primary);
  text-decoration-color: currentColor;
}

/* Linha com dois links (ex: cartão -> voltar e revisar | voltar para a loja) */
.custom-order-exit-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 14px;
  margin-top: 8px;
  padding-top: 6px;
}
.custom-order-exit-row .custom-order-link,
.custom-order-exit-row .custom-order-exit-link {
  width: auto;
  margin-top: 0;
  padding: 6px 4px;
  flex: 0 1 auto;
}
.custom-order-exit-row .custom-order-link + .custom-order-exit-link {
  border-left: 1px solid var(--border-strong);
  padding-left: 14px;
}
@media (max-width: 380px) {
  .custom-order-exit-row { flex-direction: column; gap: 4px; }
  .custom-order-exit-row .custom-order-link + .custom-order-exit-link {
    border-left: none;
    padding-left: 4px;
  }
}

.custom-order-trust {
  margin: 6px 0 0;
  text-align: center;
  font-size: .68rem;
  color: var(--text-mute);
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
}
.custom-order-trust-pix {
  margin-top: 12px;
  color: var(--primary);
  font-weight: 600;
}
.co-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 0 rgba(232, 82, 122, .5);
  animation: co-pulse 1.6s infinite;
  display: inline-block;
}
@keyframes co-pulse {
  0% { box-shadow: 0 0 0 0 rgba(232, 82, 122, .55); }
  70% { box-shadow: 0 0 0 10px rgba(232, 82, 122, 0); }
  100% { box-shadow: 0 0 0 0 rgba(232, 82, 122, 0); }
}

/* ============================================
   LOADING / STATUS / ERRO
   ============================================ */
.custom-order-loading,
.custom-order-status {
  text-align: center;
  padding: 26px 6px 12px;
}
.custom-order-loading .spinner { margin: 0 auto 12px; }
.custom-order-loading p {
  color: var(--text-dim);
  font-size: .88rem;
}

.custom-order-status-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  color: #fff;
  font-weight: 800;
  font-size: 1.3rem;
}
.custom-order-status-icon.success {
  background: var(--success);
  box-shadow: 0 8px 22px rgba(26, 168, 118, .32);
  animation: co-pop-in .35s cubic-bezier(.2, .9, .3, 1.4);
}
.custom-order-status-icon.error {
  background: var(--danger, #d92d20);
  box-shadow: 0 8px 22px rgba(217, 45, 32, .3);
}
@keyframes co-pop-in {
  from { transform: scale(.4); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.custom-order-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 12px;
}

/* ============================================
   PIX
   ============================================ */
.custom-order-pix {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 11px;
  margin-top: 4px;
}

.custom-order-pix-qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 14px 12px;
  background: linear-gradient(180deg, #fff 0%, #fff8fb 100%);
  border: 1px solid rgba(232, 82, 122, .24);
  border-radius: var(--radius);
}

.custom-order-pix-label {
  color: var(--text-dim);
  font-size: .72rem;
  font-weight: 700;
}

.custom-order-pix-qr {
  width: clamp(172px, 52vw, 208px);
  max-width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: var(--radius);
  background: #fff;
}

.custom-order-pix-timer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .74rem;
  color: var(--text-dim);
  background: #fff;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  box-shadow: 0 2px 8px rgba(232, 82, 122, .08);
}
.custom-order-pix-timer strong {
  font-variant-numeric: tabular-nums;
  color: var(--text);
  font-weight: 700;
}
.custom-order-pix-timer.warning {
  background: rgba(255, 165, 0, .12);
  color: #b86200;
}
.custom-order-pix-timer.warning strong { color: #8a4700; }
.custom-order-pix-timer.expired {
  background: rgba(217, 45, 32, .12);
  color: #b42d24;
}
.custom-order-pix-timer.expired strong { color: #8a1f17; }

.custom-order-pix-steps {
  list-style: none;
  padding: 10px 11px;
  margin: 0;
  counter-reset: pix-step;
  display: flex;
  flex-direction: column;
  gap: 7px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.custom-order-pix-steps li {
  position: relative;
  padding-left: 28px;
  color: var(--text-dim);
  font-size: .78rem;
  line-height: 1.45;
  counter-increment: pix-step;
}
.custom-order-pix-steps li::before {
  content: counter(pix-step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
  font-size: .68rem;
  display: grid;
  place-items: center;
}

.custom-order-pix-code-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.custom-order-pix-code {
  width: 100%;
  min-height: 58px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-2);
  color: var(--text-dim);
  padding: 9px 11px;
  font-size: .7rem;
  font-family: 'Courier New', ui-monospace, monospace;
  word-break: break-all;
  resize: none;
}
.custom-order-pix-copy {
  width: 100%;
  min-height: 40px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
  font-size: .84rem;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.custom-order-pix-copy:hover { background: var(--primary); color: #fff; transform: translateY(-1px); }
.custom-order-pix-copy.copied {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}

/* ============================================
   WHATSAPP (inline e step pos-pagamento)
   ============================================ */
.custom-order-whatsapp-inline,
.custom-order-whatsapp-step {
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(37, 211, 102, .35);
  border-radius: var(--radius);
  background: rgba(37, 211, 102, .06);
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.custom-order-whatsapp-step.is-saved {
  background: rgba(26, 168, 118, .08);
  border-color: rgba(26, 168, 118, .4);
}

.custom-order-whatsapp-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.custom-order-whatsapp-icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 10px rgba(37, 211, 102, .28);
}
.custom-order-whatsapp-step.is-saved .custom-order-whatsapp-icon { background: var(--success); }
.custom-order-whatsapp-head > div { display: flex; flex-direction: column; gap: 1px; }
.custom-order-whatsapp-head strong { font-size: .86rem; color: var(--text); font-weight: 700; }
.custom-order-whatsapp-head small { color: var(--text-dim); font-size: .72rem; line-height: 1.4; }

.custom-order-receipt {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-2);
  padding: 11px 13px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 8px;
}
.custom-order-receipt div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: .78rem;
  color: var(--text-dim);
}
.custom-order-receipt strong {
  color: var(--text);
  font-weight: 700;
  text-align: right;
  max-width: 60%;
}
.custom-order-receipt div.total {
  padding-top: 7px;
  border-top: 1px dashed var(--border);
  font-size: .9rem;
  color: var(--text);
}
.custom-order-receipt div.total strong { color: var(--primary); }

.custom-order-next {
  margin-top: 12px;
  padding: 12px 13px;
  border-radius: var(--radius);
  background: var(--bg-2);
  border: 1px dashed var(--border-strong);
}
.custom-order-next strong {
  display: block;
  font-size: .78rem;
  color: var(--text);
  margin-bottom: 7px;
}
.custom-order-next ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.custom-order-next li {
  position: relative;
  padding-left: 18px;
  color: var(--text-dim);
  font-size: .74rem;
  line-height: 1.45;
}
.custom-order-next li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--success);
  font-weight: 700;
}

/* ============================================
   CARTAO (Mercado Pago brick)
   ============================================ */
.custom-order-card-brick {
  min-height: 280px;
  border-radius: var(--radius);
  overflow: hidden;
}

/* ============================================
   UPSELL EM MEUS PRODUTOS
   ============================================ */
.custom-order-upsell {
  position: relative;
  border: 1px solid rgba(232, 82, 122, .22);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #fff5f8 0%, #fff 70%);
  padding: 15px 14px;
  margin: 16px 0;
  text-align: left;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(232, 82, 122, .06);
}

.custom-order-upsell-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: .64rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.custom-order-upsell-title {
  color: var(--text);
  font-weight: 700;
  font-size: .95rem;
  margin-bottom: 5px;
  line-height: 1.3;
}
.custom-order-upsell p {
  font-size: .78rem;
  line-height: 1.5;
  margin: 0 0 11px;
}

.custom-order-upsell-button {
  width: 100%;
  min-height: 40px;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: #fff;
  border: none;
  font-size: .84rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
  box-shadow: 0 5px 14px rgba(232, 82, 122, .22);
}
.custom-order-upsell-button:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(232, 82, 122, .35);
}

/* ============================================
   UTIL
   ============================================ */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================
   BREAKPOINTS
   ============================================ */
@media (min-width: 520px) {
  .custom-order-modal { padding: 18px 14px 32px; }
  .custom-order-modal-content { padding: 22px 22px 22px; }
  .custom-order-two { grid-template-columns: 1fr 1fr; }
  .custom-order-pix-qr-wrap { padding: 18px; }
  .co-mold-grid { max-height: 300px; }
}

@media (max-width: 380px) {
  .custom-order-card-no-results { max-width: 100%; }
  .custom-order-amount { font-size: 1.05rem; }
  .custom-order-header h3, .custom-order-status h3 { font-size: 1rem; }
  .custom-order-modal { padding: 10px 8px 24px; }
  .custom-order-modal-content { padding: 14px 12px 16px; }

  /* Mold tiles: 1 col em telas muito estreitas para evitar título cortado */
  .co-mold-grid {
    grid-template-columns: 1fr;
    max-height: 240px;
  }
  .co-mold-tile {
    grid-template-columns: 40px 1fr;
    min-height: 56px;
    padding: 8px;
  }
  .co-mold-tile-image,
  .co-mold-tile-typed .co-mold-tile-icon {
    width: 40px;
    height: 40px;
  }
  .co-mold-tile-body strong { font-size: .74rem; }
  .co-selected-mold {
    grid-template-columns: 42px 1fr;
  }
  .co-selected-mold-empty {
    grid-template-columns: 1fr;
  }
  .co-selected-mold .custom-order-link,
  .co-selected-mold .custom-order-secondary {
    grid-column: 1 / -1;
    width: 100%;
    margin-top: 2px;
  }

  /* Choices em coluna única em telas muito estreitas */
  .custom-order-choice-grid {
    grid-template-columns: 1fr;
  }

  /* Card no grid: textos um pouco menores */
  .custom-order-card .custom-order-card-title { font-size: .74rem; }
  .custom-order-card-description { font-size: .64rem; }
  .custom-order-card-price { font-size: .78rem; }
  .custom-order-card-price-extra { font-size: .58rem; }
  .custom-order-card .custom-order-card-button { font-size: .7rem; min-height: 30px; }
}
