/* T-Print3D Calculadora. Tarjeta propia con fondo claro: se ve igual sobre fondo blanco o el oscuro del móvil. */
.tp3d-calc {
  --tp-bg: #ffffff; --tp-soft: #f4f5f1; --tp-ink: #1d211b; --tp-muted: #5d6658; --tp-line: #d8dcd2;
  --tp-accent: #5f8f12; --tp-accent-ink: #ffffff; --tp-err: #b3261e; --tp-ok: #2f7d32;
  box-sizing: border-box; background: var(--tp-bg); color: var(--tp-ink); border: 1px solid var(--tp-line); border-radius: 10px;
  padding: 16px; font-size: 15px; line-height: 1.45; text-align: left; max-width: 1180px; margin: 0 auto;
}
.tp3d-calc *, .tp3d-calc *::before, .tp3d-calc *::after { box-sizing: border-box; }
.tp3d-calc [hidden] { display: none !important; }
.tp3d-calc p { margin: 0; padding: 0; }

.tp3d-btn { font: inherit; font-weight: 600; border: 0; border-radius: 6px; padding: 11px 18px; background: var(--tp-accent); color: var(--tp-accent-ink); cursor: pointer; line-height: 1.2; }
.tp3d-btn:hover { filter: brightness(1.08); }
.tp3d-btn:disabled { opacity: .5; cursor: default; filter: none; }
.tp3d-btn-sec { background: transparent; color: var(--tp-ink); border: 1px solid var(--tp-line); font-weight: 500; }
.tp3d-calc button:focus-visible, .tp3d-calc select:focus-visible, .tp3d-calc input:focus-visible { outline: 2px solid var(--tp-accent); outline-offset: 2px; }

.tp3d-drop { display: grid; gap: 8px; justify-items: center; text-align: center; padding: 36px 16px; border: 2px dashed var(--tp-line); border-radius: 8px; background: var(--tp-soft); }
.tp3d-drop-tit { font-size: 1.2em; font-weight: 600; }
.tp3d-drop-sub { color: var(--tp-muted); font-size: 14px; }
.tp3d-arrastre .tp3d-drop, .tp3d-arrastre .tp3d-lista { border-color: var(--tp-accent); background: #eef5e1; }

.tp3d-main { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.tp3d-izq { display: grid; gap: 14px; min-width: 0; }
.tp3d-visor { border: 1px solid var(--tp-line); border-radius: 8px; overflow: hidden; }
.tp3d-cv-w { position: relative; }
.tp3d-cotas span { position: absolute; transform: translate(-50%, -50%); background: rgba(255,255,255,.93); border: 1px solid #c3d6a2; color: #3f6a0a; font-size: 11.5px; font-weight: 600; line-height: 1.5; padding: 0 6px; border-radius: 4px; white-space: nowrap; pointer-events: none; font-variant-numeric: tabular-nums; }
/* Lista de piezas, estilo carrito */
.tp3d-carro-cab { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; font-size: 14.5px; }
.tp3d-carro-cab strong { font-weight: 700; }
.tp3d-carro-cab span { color: var(--tp-muted); font-weight: 500; }
.tp3d-carro-cab .tp3d-link { padding: 0; font-weight: 600; text-decoration: none; }
.tp3d-carro-cab .tp3d-link:hover { text-decoration: underline; }
.tp3d-qty { display: inline-flex; align-items: stretch; border: 1px solid var(--tp-line); border-radius: 6px; overflow: hidden; background: var(--tp-bg); }
.tp3d-qty button { all: unset; box-sizing: border-box; width: 28px; text-align: center; cursor: pointer; background: var(--tp-soft); color: var(--tp-ink); font-size: 16px; line-height: 30px; user-select: none; }
.tp3d-qty button:disabled { color: #b5bbae; cursor: default; }
.tp3d-qty button:focus-visible { outline: 2px solid var(--tp-accent); outline-offset: -2px; }
.tp3d-calc .tp3d-qty input[type=number] { width: 46px; text-align: center; border: 0; border-radius: 0; padding: 4px 2px; background: var(--tp-bg); -moz-appearance: textfield; appearance: textfield; }
.tp3d-qty input::-webkit-outer-spin-button, .tp3d-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
/* Panel de opciones de la pieza elegida */
.tp3d-panel { border: 1px solid var(--tp-accent); border-radius: 8px; position: relative; background: var(--tp-bg); min-width: 0; }
.tp3d-panel:empty { display: none; }
.tp3d-panel-cab { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 14px 10px; border-bottom: 1px solid var(--tp-line); }
.tp3d-panel-tit { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp3d-panel .tp3d-editor { border-top: 0; padding: 12px 14px 14px; }
.tp3d-calc .tp3d-chk { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; color: var(--tp-ok); background: #eef5e1; border-radius: 6px; padding: 8px 10px; }
.tp3d-chk svg { flex: none; margin-top: 2px; }
.tp3d-chk strong { font-weight: 700; }
.tp3d-calc .tp3d-chk-err { color: var(--tp-err); background: #fdecea; display: block; }
.tp3d-calc .tp3d-chk-warn { color: #a35a00; background: #fff6e8; display: block; }
.tp3d-chk a { color: inherit; text-decoration: underline; }
.tp3d-calc .tp3d-confianza { flex-basis: 100%; display: flex; gap: 7px; align-items: center; font-size: 13px; color: var(--tp-muted); }
.tp3d-confianza svg { flex: none; color: var(--tp-accent); }
#tp3d-cv { display: block; width: 100%; aspect-ratio: 4 / 3; touch-action: none; cursor: grab; background: #eef0ea; }
.tp3d-leyenda { display: flex; flex-wrap: wrap; gap: 14px; padding: 8px 12px; font-size: 13px; color: var(--tp-muted); border-top: 1px solid var(--tp-line); }
.tp3d-calc .tp3d-leyenda { margin: 0; padding: 8px 12px; }
.tp3d-calc .tp3d-nota-visor { margin: 0; padding: 0 12px 10px; font-size: 12px; line-height: 1.45; color: var(--tp-muted); }
.tp3d-solo-movil { display: none; }

.tp3d-lista { display: grid; gap: 6px; border-radius: 8px; align-content: start; }
.tp3d-pieza { border: 1px solid var(--tp-line); border-radius: 8px; background: var(--tp-bg); }
.tp3d-pieza.tp3d-sel { border-color: var(--tp-accent); }
.tp3d-pieza.tp3d-abierta { box-shadow: 0 0 0 1px var(--tp-accent) inset; }
.tp3d-fila { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto minmax(64px, auto) auto; gap: 10px; align-items: center; padding: 7px 8px 7px 8px; cursor: pointer; }
.tp3d-fila:hover { background: var(--tp-soft); border-radius: 8px; }
.tp3d-pieza.tp3d-sel { box-shadow: 0 0 0 1px var(--tp-accent) inset; background: #f7faf1; }
.tp3d-fila:focus-visible { outline: 2px solid var(--tp-accent); outline-offset: -2px; border-radius: 8px; }
.tp3d-mini-w { position: relative; width: 40px; height: 40px; }
.tp3d-mini { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; background: var(--tp-soft); display: block; }
.tp3d-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0,0,0,.25); box-shadow: 0 0 0 2px var(--tp-bg); flex: none; }
.tp3d-dot-mini { position: absolute; right: -4px; bottom: -4px; }
.tp3d-txt { display: grid; min-width: 0; gap: 1px; }
.tp3d-nombre { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; }
.tp3d-sub { font-size: 12.5px; color: var(--tp-muted); line-height: 1.35; overflow-wrap: anywhere; }
.tp3d-sub a { color: inherit; text-decoration: underline; }
.tp3d-precio { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; font-size: 15px; }
.tp3d-precio small { display: block; font-weight: 400; color: var(--tp-muted); font-size: 11.5px; }
.tp3d-ed { color: var(--tp-muted); font-size: 15px; width: 18px; text-align: center; }
.tp3d-x { all: unset; cursor: pointer; color: var(--tp-muted); font-size: 22px; line-height: 1; padding: 2px 6px; border-radius: 4px; }
.tp3d-x:hover { color: var(--tp-err); }
.tp3d-x:focus-visible { outline: 2px solid var(--tp-accent); }
.tp3d-editor { display: grid; gap: 10px; padding: 4px 12px 12px; border-top: 1px solid var(--tp-line); padding-top: 12px; }
.tp3d-campos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tp3d-campos label, .tp3d-medidas-ed label { display: grid; gap: 3px; font-size: 13px; color: var(--tp-muted); margin: 0; }
.tp3d-calc select, .tp3d-calc input[type=text], .tp3d-calc input[type=number] { font: inherit; font-size: 14px; color: var(--tp-ink); background: var(--tp-soft); border: 1px solid var(--tp-line); border-radius: 6px; padding: 7px 8px; width: 100%; min-width: 0; height: auto; margin: 0; }
.tp3d-campo { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px; font-size: 13px; color: var(--tp-muted); min-width: 0; }
.tp3d-lab { display: flex; align-items: center; gap: 6px; }
.tp3d-calc .tp3d-lab label { display: inline; font: inherit; color: inherit; margin: 0; }
.tp3d-q { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px 1px 6px; border-radius: 999px; background: #eef5e1; color: var(--tp-accent); font-size: 12px; font-weight: 600; line-height: 18px; }
@media (hover: hover) { .tp3d-q:hover { background: var(--tp-accent); color: #fff; } }
.tp3d-q:focus-visible { outline: 2px solid var(--tp-accent); outline-offset: 2px; }
.tp3d-q::after { content: ""; position: absolute; inset: -8px -4px; } /* zona táctil más grande */
.tp3d-q { position: relative; }
/* Desplegable de colores con su cuadrado */
.tp3d-cs { position: relative; }
.tp3d-cs-btn { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 8px; width: 100%; cursor: pointer; font-size: 14px; color: var(--tp-ink); background: var(--tp-soft); border: 1px solid var(--tp-line); border-radius: 6px; padding: 7px 8px; line-height: 1.45; min-width: 0; max-width: 100%; overflow: hidden; }
.tp3d-cs-btn > span:not(.tp3d-caret) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp3d-cs-btn:disabled { cursor: default; color: var(--tp-muted); }
.tp3d-cs-btn:focus-visible { outline: 2px solid var(--tp-accent); outline-offset: 2px; }
.tp3d-caret { color: var(--tp-muted); font-size: 12px; }
.tp3d-cs-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); max-height: 260px; overflow-y: auto; background: var(--tp-bg); border: 1px solid var(--tp-line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.14); padding: 4px; display: grid; min-width: 170px; }
.tp3d-cs-op { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; cursor: pointer; font-size: 14px; color: var(--tp-ink); }
.tp3d-cs-op:hover, .tp3d-cs-op:focus-visible { background: var(--tp-soft); outline: none; }
.tp3d-cs-op[aria-selected=true] { font-weight: 600; background: #eef5e1; }
.tp3d-sq { display: inline-block; flex: none; width: 18px; height: 18px; border-radius: 4px; border: 1px solid rgba(0,0,0,.25); }
/* Falta elegir material o color */
.tp3d-falta { color: #a35a00; font-weight: 600; }
.tp3d-calc .tp3d-vacio { border-color: #d08a2a; }
.tp3d-validar .tp3d-pieza.tp3d-incompleta { border-color: #d08a2a; box-shadow: 0 0 0 1px #d08a2a inset; }
.tp3d-todas { justify-self: start; font-size: 13.5px; padding: 8px 12px; }
.tp3d-medidas-ed { display: grid; grid-template-columns: auto repeat(3, minmax(0, 1fr)) auto; gap: 8px; align-items: end; }
.tp3d-medidas-ed > span { font-size: 13px; color: var(--tp-muted); padding-bottom: 9px; }
.tp3d-medidas-ed label { grid-template-columns: auto 1fr; align-items: center; gap: 6px; }
.tp3d-medidas-ed b { font-weight: 600; color: var(--tp-ink); font-size: 13px; }
.tp3d-link { all: unset; cursor: pointer; font-size: 13px; color: var(--tp-accent); text-decoration: underline; padding-bottom: 9px; white-space: nowrap; }
.tp3d-nota { font-size: 12.5px; color: var(--tp-muted); }
.tp3d-msg { font-size: 14px; color: var(--tp-muted); }
.tp3d-err { color: var(--tp-err); } .tp3d-ok { color: var(--tp-ok); }
.tp3d-calc .tp3d-warn { color: #a35a00; }
.tp3d-warn a { color: inherit; text-decoration: underline; }
.tp3d-orient { color: var(--tp-muted); font-weight: 500; }
#tp3d-nota-pie:empty { display: none; }
.tp3d-spin { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--tp-line); border-top-color: var(--tp-accent); border-radius: 50%; margin-right: 8px; vertical-align: -2px; animation: tp3d-g 0.8s linear infinite; }
@keyframes tp3d-g { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .tp3d-spin { animation: none; } }

.tp3d-pie { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: flex-start; justify-content: space-between; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--tp-line); }
.tp3d-resumen { display: grid; gap: 6px; flex: 1 1 320px; max-width: 440px; }
.tp3d-linea { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14.5px; }
.tp3d-linea > span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.tp3d-envio-zona { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tp3d-calc .tp3d-envio-zona select { width: auto; padding: 4px 8px; }
.tp3d-calc .tp3d-envio-zona label { margin: 0; }
.tp3d-logo-envio { height: 22px; width: auto; display: block; }
.tp3d-calc .tp3d-envio-txt { font-size: 12.5px; color: var(--tp-muted); margin-top: -2px; }
.tp3d-linea s { color: var(--tp-muted); font-weight: 400; }
.tp3d-gratis { color: var(--tp-ok); font-weight: 700; }
.tp3d-resumen .tp3d-total { border-top: 1px solid var(--tp-line); padding-top: 8px; margin-top: 2px; }
.tp3d-calc .tp3d-minimo { font-size: 14px; font-weight: 600; color: #8a4b00; background: #fff3e0; border: 1px solid #f0c27a; border-radius: 6px; padding: 9px 12px; }
.tp3d-total-w { display: grid; gap: 2px; }
.tp3d-total { display: flex; align-items: baseline; gap: 8px; }
.tp3d-calc .tp3d-envio { font-size: 13.5px; color: var(--tp-muted); }
.tp3d-envio:empty { display: none; }
.tp3d-calc .tp3d-envio { font-size: 14px; color: #2c5a06; background: #eef5e1; border: 1px solid #b9d68d; border-radius: 6px; padding: 9px 12px; }
.tp3d-calc .tp3d-envio strong { font-weight: 700; }
.tp3d-calc .tp3d-minimo { font-weight: 400; }
.tp3d-calc .tp3d-minimo strong { font-weight: 700; }
.tp3d-minimo .tp3d-link, .tp3d-envio .tp3d-link { padding: 0; color: inherit; font-weight: 700; font-size: inherit; }
.tp3d-calc .tp3d-iva-incl { font-size: 12.5px; color: var(--tp-muted); text-align: right; margin-top: -4px; }
.tp3d-linea-iva { color: var(--tp-muted); }
.tp3d-calc .tp3d-envio-min { color: #a35a00; font-weight: 600; }
.tp3d-calc .tp3d-envio-ok { color: var(--tp-ok); font-weight: 600; }
.tp3d-total span { color: var(--tp-muted); }
.tp3d-total strong { font-size: 1.6em; font-variant-numeric: tabular-nums; }
.tp3d-total small { color: var(--tp-muted); }
.tp3d-acciones { display: grid; gap: 10px; flex: 0 1 380px; justify-items: stretch; }
.tp3d-acciones .tp3d-btn { padding: 13px 26px; font-size: 16.5px; }
.tp3d-estado { flex-basis: 100%; font-size: 14px; color: var(--tp-muted); min-height: 1.4em; }

@media (max-width: 820px) {
  .tp3d-calc { padding: 12px; border-radius: 8px; }
  .tp3d-main { grid-template-columns: 1fr; gap: 12px; }
  .tp3d-panel { position: static; }
  #tp3d-cv { aspect-ratio: 16 / 11; }
  .tp3d-solo-pc { display: none; }
  .tp3d-solo-movil { display: inline; }
  .tp3d-fila { grid-template-columns: 40px minmax(0, 1fr) auto auto; grid-template-areas: "m t p x" "m q p x"; gap: 4px 8px; }
  .tp3d-mini-w { grid-area: m; align-self: start; }
  .tp3d-txt { grid-area: t; }
  .tp3d-qty, .tp3d-qty-vacio { grid-area: q; justify-self: start; }
  .tp3d-precio { grid-area: p; }
  .tp3d-x { grid-area: x; }
  .tp3d-qty button { width: 34px; line-height: 32px; }
  .tp3d-ed { display: none; }
  .tp3d-campos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tp3d-medidas-ed { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tp3d-medidas-ed > span { grid-column: 1 / -1; padding: 0; }
  .tp3d-link { grid-column: 1 / -1; padding: 0; }
  .tp3d-calc select, .tp3d-calc input[type=text], .tp3d-calc input[type=number] { font-size: 16px; } /* evita el zoom automático del iPhone */
  .tp3d-cs-btn, .tp3d-cs-op { font-size: 16px; }
  .tp3d-cs-btn { line-height: 1.45; }
  .tp3d-cs-op { padding: 11px 10px; }
  .tp3d-resumen, .tp3d-acciones { flex: 1 1 100%; max-width: none; }
}

/* Ventana de ayuda (fuera de la tarjeta, en el body) */
.tp3d-sin-scroll, .tp3d-sin-scroll body { overflow: hidden; }
.tp3d-modal { position: fixed; inset: 0; z-index: 999999; background: rgba(20,24,18,.55); display: flex; align-items: center; justify-content: center; padding: 16px; font-size: 15px; line-height: 1.45; text-align: left; }
.tp3d-modal[hidden] { display: none; }
.tp3d-modal *, .tp3d-modal *::before, .tp3d-modal *::after { box-sizing: border-box; }
.tp3d-modal-caja { background: #fff; color: #1d211b; border-radius: 12px; width: 100%; max-width: 560px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(0,0,0,.3); outline: none; }
.tp3d-modal-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 10px 20px; border-bottom: 1px solid #d8dcd2; }
.tp3d-modal-cab h3 { margin: 0; padding: 0; font-size: 18px; font-weight: 700; color: #1d211b; line-height: 1.3; }
.tp3d-modal-x { all: unset; cursor: pointer; font-size: 26px; line-height: 1; color: #5d6658; padding: 4px 10px; border-radius: 6px; }
.tp3d-modal-x:hover { background: #f4f5f1; color: #1d211b; }
.tp3d-modal-x:focus-visible { outline: 2px solid #5f8f12; }
.tp3d-modal-cuerpo { overflow-y: auto; padding: 14px 20px 20px; display: grid; gap: 12px; }
.tp3d-modal-cuerpo p { margin: 0; padding: 0; color: #1d211b; }
.tp3d-ops { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tp3d-ops li { display: flex; gap: 14px; align-items: center; margin: 0; padding: 8px; border: 1px solid #d8dcd2; border-radius: 8px; }
.tp3d-ops li::before { content: none; }
.tp3d-ops strong { font-weight: 700; }
.tp3d-ops p { font-size: 14px; color: #5d6658 !important; margin-top: 2px !important; }
.tp3d-dib { flex: none; display: block; }
.tp3d-tag { display: inline-block; font-size: 11.5px; font-weight: 600; color: #fff; background: #5f8f12; border-radius: 4px; padding: 1px 6px; vertical-align: 1px; }
.tp3d-fin { font-style: italic; }
.tp3d-aviso { font-size: 13.5px; background: #fff6e8; border: 1px solid #f0d3a6; border-radius: 8px; padding: 10px 12px !important; }
@media (max-width: 520px) {
  .tp3d-modal { align-items: flex-end; padding: 0; }
  .tp3d-modal-caja { border-radius: 14px 14px 0 0; max-height: 88vh; max-height: 88dvh; }
  .tp3d-ops li { gap: 10px; }
  .tp3d-dib { width: 52px; height: auto; }
  .tp3d-dib-capa { width: 72px; }
}
.tp3d-resumen .tp3d-total > span:first-child { margin-right: auto; font-weight: 600; color: var(--tp-ink); }
.tp3d-total small:empty { display: none; }
.tp3d-pago { display: grid; gap: 7px; justify-items: center; text-align: center; }
.tp3d-calc .tp3d-pago-tit { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--tp-ink); }
.tp3d-pago-tit svg { color: var(--tp-accent); flex: none; }
.tp3d-pago-met { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.tp3d-pago-met span { font-size: 12px; font-weight: 600; color: var(--tp-muted); border: 1px solid var(--tp-line); border-radius: 5px; padding: 2px 8px; background: var(--tp-bg); }
.tp3d-pago-met img { height: 24px; width: auto; display: block; }

/* ---------- Colores oscuros (Ajustes → Colores de la calculadora), como el carrito y Finalizar compra ---------- */
.tp3d-calc.tp3d-oscuro {
  --tp-bg: #1d211b; --tp-soft: #141712; --tp-ink: #e8ebe4; --tp-muted: #a2ab9c; --tp-line: #343a30;
  --tp-accent: #9bc53d; --tp-accent-ink: #141712; --tp-err: #ff8a80; --tp-ok: #9bc53d;
  color-scheme: dark;
}
.tp3d-oscuro .tp3d-btn:hover { filter: brightness(1.1); }
.tp3d-oscuro .tp3d-btn-sec { color: var(--tp-ink); }
.tp3d-oscuro.tp3d-arrastre .tp3d-drop, .tp3d-oscuro.tp3d-arrastre .tp3d-lista { background: #232a1d; }
.tp3d-calc.tp3d-oscuro .tp3d-chk { background: #232a1d; }
.tp3d-calc.tp3d-oscuro .tp3d-chk-err { background: #3a1f1c; }
.tp3d-calc.tp3d-oscuro .tp3d-chk-warn { color: #ffb74d; background: #33281a; }
.tp3d-oscuro .tp3d-pieza.tp3d-sel { background: #232a1d; }
.tp3d-oscuro .tp3d-dot, .tp3d-oscuro .tp3d-sq { border-color: rgba(255,255,255,.25); }
.tp3d-oscuro .tp3d-q { background: #232a1d; }
.tp3d-oscuro .tp3d-q:hover { color: #141712; }
.tp3d-oscuro .tp3d-cs-op[aria-selected=true] { background: #232a1d; }
.tp3d-oscuro .tp3d-cs-list { box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.tp3d-oscuro .tp3d-qty button:disabled { color: #4f574a; }
.tp3d-oscuro .tp3d-falta, .tp3d-calc.tp3d-oscuro .tp3d-warn, .tp3d-calc.tp3d-oscuro .tp3d-envio-min { color: #ffb74d; }
.tp3d-calc.tp3d-oscuro .tp3d-minimo { color: #ffcc80; background: #33281a; border-color: #6b4f22; }
.tp3d-calc.tp3d-oscuro .tp3d-envio { color: #c5e08a; background: #232a1d; border-color: #4a5e2a; }
.tp3d-oscuro .tp3d-pago-met span { background: var(--tp-soft); }
.tp3d-oscuro .tp3d-cotas span { background: rgba(20,23,18,.9); border-color: #4a5e2a; color: #c5e08a; }
/* Visor oscuro (Ajustes → Fondo del visor 3D) */
.tp3d-visor-osc #tp3d-cv { background: #181c16; }
.tp3d-calc:not(.tp3d-oscuro).tp3d-visor-osc .tp3d-cotas span { background: rgba(20,23,18,.9); border-color: #4a5e2a; color: #c5e08a; }
.tp3d-calc.tp3d-oscuro:not(.tp3d-visor-osc) .tp3d-cotas span { background: rgba(255,255,255,.93); border-color: #c3d6a2; color: #3f6a0a; }
/* Ventana de ayuda */
.tp3d-modal-osc .tp3d-modal-caja { background: #1d211b; color: #e8ebe4; border: 1px solid #343a30; }
.tp3d-modal-osc .tp3d-modal-cab { border-bottom-color: #343a30; }
.tp3d-modal-osc .tp3d-modal-cab h3, .tp3d-modal-osc .tp3d-modal-cuerpo p { color: #e8ebe4; }
.tp3d-modal-osc .tp3d-modal-x { color: #a2ab9c; }
.tp3d-modal-osc .tp3d-modal-x:hover { background: #141712; color: #e8ebe4; }
.tp3d-modal-osc .tp3d-ops li { border-color: #343a30; }
.tp3d-modal-osc .tp3d-ops p { color: #a2ab9c !important; }
.tp3d-modal-osc .tp3d-tag { background: #9bc53d; color: #141712; }
.tp3d-modal-osc .tp3d-aviso { background: #33281a; border-color: #6b4f22; }
/* Logos: sin las esquinas redondeadas ni sombras que el tema pone a todas las imágenes */
.tp3d-calc img.tp3d-logo-envio, .tp3d-calc .tp3d-pago-met img { border-radius: 0 !important; box-shadow: none !important; border: 0 !important; max-width: none !important; }
.tp3d-calc img.tp3d-logo-envio { height: 26px !important; width: auto !important; }
.tp3d-calc .tp3d-pago-met img { height: 26px !important; width: auto !important; }

/* Etiqueta "No recomendado" en la ayuda de materiales */
.tp3d-tag.tp3d-tag-no, .tp3d-modal-osc .tp3d-tag.tp3d-tag-no { background: #d08a2a; color: #141712; }

/* Código de descuento */
.tp3d-calc .tp3d-cupon { display: flex; gap: 8px; margin: 12px 0 0; }
.tp3d-calc .tp3d-cupon[hidden] { display: none; }
.tp3d-calc .tp3d-cupon input[type=text] { flex: 1; }
.tp3d-calc .tp3d-cupon .tp3d-btn { padding: 7px 14px; white-space: nowrap; }
.tp3d-calc .tp3d-cupon-msg { margin: 6px 0 0; font-size: 13px; line-height: 1.4; color: var(--tp-ok); }
.tp3d-calc .tp3d-cupon-msg.tp3d-cupon-err { color: var(--tp-err); }
.tp3d-calc .tp3d-linea-desc > span:last-child { color: var(--tp-ok); }
.tp3d-calc .tp3d-linea-desc b { font-weight: 600; }
.tp3d-calc .tp3d-linea-desc .tp3d-link { font-size: 12.5px; margin-left: 4px; padding: 0; }
.tp3d-calc.tp3d-oscuro .tp3d-cupon-msg { color: #9bc53d; }
.tp3d-calc.tp3d-oscuro .tp3d-cupon-msg.tp3d-cupon-err { color: #ff8a80; }
.tp3d-calc.tp3d-oscuro .tp3d-linea-desc > span:last-child { color: #9bc53d; }

.tp3d-calc .tp3d-chk + .tp3d-chk { margin-top: 8px; }
.tp3d-calc.tp3d-oscuro .tp3d-chk-err a { color: inherit; }

/* Recuperando las piezas del carrito */
.tp3d-calc .tp3d-cargando { display: none; padding: 48px 16px; text-align: center; color: var(--tp-muted); border: 1px solid var(--tp-line); border-radius: 8px; background: var(--tp-soft); }
.tp3d-calc.tp3d-recuperando .tp3d-cargando { display: block; }
.tp3d-calc.tp3d-recuperando .tp3d-drop { display: none; }

/* Aviso del archivo dentro del visor, arriba */
.tp3d-calc .tp3d-aviso-visor { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 3; pointer-events: none; display: flex; justify-content: center; }
.tp3d-calc .tp3d-aviso-visor:empty { display: none; }
.tp3d-calc .tp3d-aviso-visor .tp3d-chk { margin: 0; max-width: 100%; box-shadow: 0 2px 10px rgba(0,0,0,.25); pointer-events: auto; font-size: 13px; }
.tp3d-calc .tp3d-aviso-visor .tp3d-chk:not(.tp3d-chk-err):not(.tp3d-chk-warn) { display: inline-flex; }
@media (max-width: 600px) { .tp3d-calc .tp3d-aviso-visor { top: 6px; left: 6px; right: 6px; } .tp3d-calc .tp3d-aviso-visor .tp3d-chk { font-size: 12px; padding: 6px 8px; } }

/* v0.15: resumen del pedido en su propia tarjeta, a la derecha bajo las opciones de la pieza */
.tp3d-der { display: grid; gap: 18px; align-content: start; min-width: 0; }
.tp3d-calc .tp3d-pie { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin: 0; padding: 0 18px 16px; border: 1px solid var(--tp-accent); border-radius: 10px; background: var(--tp-soft); box-shadow: 0 6px 24px rgba(0,0,0,.12); overflow: hidden; }
.tp3d-calc .tp3d-pie > * { max-width: none; width: 100%; flex: none; }
.tp3d-calc .tp3d-pie-tit { display: flex; align-items: center; gap: 8px; margin: 0 -18px; padding: 10px 18px; width: auto; background: var(--tp-accent); color: var(--tp-accent-ink); font-weight: 700; font-size: 16px; letter-spacing: .2px; }
.tp3d-calc .tp3d-pie-tit svg { flex: none; }
.tp3d-calc .tp3d-pie .tp3d-estado { min-height: 0; }
.tp3d-calc .tp3d-pie .tp3d-estado:empty { display: none; }
.tp3d-calc .tp3d-pie .tp3d-total strong { color: var(--tp-accent); }
.tp3d-calc.tp3d-oscuro .tp3d-pie { border-color: #4a5e2a; background: linear-gradient(180deg, #232c1c, #1b2017); box-shadow: 0 6px 24px rgba(0,0,0,.35); }
.tp3d-calc.tp3d-oscuro .tp3d-pie .tp3d-total strong { color: #c5e08a; }
@media (max-width: 820px) {
  /* Móvil: visor, opciones de la pieza, lista de piezas y resumen */
  .tp3d-izq, .tp3d-der { display: contents; }
  .tp3d-visor { order: 1; }
  .tp3d-panel { order: 2; }
  .tp3d-carro { order: 3; }
  .tp3d-calc .tp3d-pie { order: 4; margin-top: 4px; padding: 0 14px 14px; }
  .tp3d-calc .tp3d-pie-tit { margin: 0 -14px; padding: 10px 14px; }
}

/* v0.17: franja de posición al pie del visor y aviso de envío gratis con barra */
.tp3d-calc .tp3d-pos-visor { display: flex; gap: 8px; align-items: center; justify-content: center; margin: 0; padding: 9px 12px; background: #f1f7e6; color: #3f5a14; font-size: 13.5px; line-height: 1.35; border-top: 1px solid #cfe3a8; text-align: center; }
.tp3d-calc .tp3d-pos-visor svg { flex: none; }
.tp3d-calc .tp3d-pos-visor strong { font-weight: 700; }
.tp3d-calc .tp3d-pos-visor svg { color: #6f9a1f; }
.tp3d-calc.tp3d-oscuro .tp3d-pos-visor { background: #26311c; color: #dfeec0; border-top-color: #3d4f27; }
.tp3d-calc.tp3d-oscuro .tp3d-pos-visor strong { color: #c5e08a; }
.tp3d-calc.tp3d-oscuro .tp3d-pos-visor svg { color: #9bc53d; }
.tp3d-calc .tp3d-envio { display: grid; gap: 10px; padding: 12px 14px; border: 1px solid var(--tp-accent); border-radius: 8px; color: var(--tp-ink); }
.tp3d-calc .tp3d-envio[hidden] { display: none; }
.tp3d-eg-cab { display: flex; gap: 12px; align-items: center; }
.tp3d-eg-cab svg { flex: none; color: var(--tp-accent); }
.tp3d-eg-cab > div { display: grid; gap: 1px; font-size: 14px; line-height: 1.35; }
.tp3d-calc .tp3d-eg-cab strong { color: var(--tp-ok); font-size: 15px; font-weight: 700; }
.tp3d-eg-cab b { font-weight: 700; }
.tp3d-eg-barra { height: 8px; border-radius: 5px; background: var(--tp-line); overflow: hidden; }
.tp3d-eg-barra i { display: block; height: 100%; border-radius: 5px; background: var(--tp-accent); transition: width .4s ease; }
.tp3d-calc.tp3d-oscuro .tp3d-envio { background: #26311c; color: #dfeec0; border-color: #6f9a1f; }
.tp3d-calc.tp3d-oscuro .tp3d-eg-cab strong { color: #c5e08a; }
.tp3d-calc.tp3d-oscuro .tp3d-eg-cab b { color: #fff; }
.tp3d-calc.tp3d-oscuro .tp3d-eg-barra { background: #141712; }
.tp3d-calc.tp3d-oscuro .tp3d-eg-barra i { background: linear-gradient(90deg, #6f9a1f, #9bc53d); }
@media (max-width: 600px) {
  .tp3d-calc .tp3d-pos-visor { font-size: 12.5px; padding: 7px 10px; gap: 6px; }
  .tp3d-calc .tp3d-pos-visor svg { width: 14px; height: 14px; }
  .tp3d-calc .tp3d-aviso-visor .tp3d-chk { font-size: 11.5px; padding: 4px 8px; gap: 6px; }
  .tp3d-calc .tp3d-aviso-visor .tp3d-chk svg { width: 13px; height: 13px; margin-top: 1px; }
}

/* Piezas demasiado grandes: aviso encima del botón de pago */
.tp3d-calc .tp3d-fuera { font-size: 14px; color: #8a4b00; background: #fff3e0; border: 1px solid #f0c27a; border-radius: 6px; padding: 9px 12px; }
.tp3d-calc .tp3d-fuera:empty { display: none; }
.tp3d-calc .tp3d-fuera a { color: inherit; font-weight: 700; text-decoration: underline; }
.tp3d-calc.tp3d-oscuro .tp3d-fuera { color: #ffb74d; background: #33281a; border-color: #5a4424; }

/* v0.18.3: aviso de archivos que no se pueden añadir (PDF, JPG, demasiado grandes) */
.tp3d-calc .tp3d-rechazo { position: relative; margin: 0 0 12px; padding: 12px 40px 12px 14px; border: 1px solid #f0c27a; border-left: 4px solid #e08a00; border-radius: 8px; background: #fff3e0; color: #6b3a00; font-size: 14px; line-height: 1.45; }
.tp3d-calc .tp3d-rechazo[hidden] { display: none; }
.tp3d-calc .tp3d-rechazo p { margin: 0; }
.tp3d-calc .tp3d-rechazo p + p { margin-top: 6px; }
.tp3d-calc .tp3d-rechazo a { color: inherit; font-weight: 600; text-decoration: underline; }
.tp3d-calc .tp3d-rechazo-x { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border: 0; background: transparent; color: inherit; font-size: 20px; line-height: 1; cursor: pointer; border-radius: 6px; }
.tp3d-calc .tp3d-rechazo-x:hover { background: rgba(0,0,0,.06); }
.tp3d-calc.tp3d-oscuro .tp3d-rechazo { background: #33281a; border-color: #6b4a1a; border-left-color: #ffb74d; color: #ffe0b2; }
.tp3d-calc.tp3d-oscuro .tp3d-rechazo strong { color: #ffb74d; }
.tp3d-calc.tp3d-oscuro .tp3d-rechazo-x:hover { background: rgba(255,255,255,.08); }

/* v0.19.4: en el móvil la calculadora usa casi todo el ancho (la fila de Divi va al 80 %) y la Calidad va en su propia línea */
@media (max-width: 820px) {
  .tp3d-calc .tp3d-campos > .tp3d-campo:has(select[data-f=cal]) { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
  .et_pb_row:has(#tp3d-calc) { width: calc(100% - 20px) !important; max-width: none !important; padding-left: 0 !important; padding-right: 0 !important; }
  .et_pb_row:has(#tp3d-calc) .et_pb_column:has(#tp3d-calc), .et_pb_row:has(#tp3d-calc) .et_pb_module:has(#tp3d-calc) { padding-left: 0 !important; padding-right: 0 !important; margin-left: 0 !important; margin-right: 0 !important; }
  .tp3d-calc { padding: 10px; }
}

/* v0.19.5: en el móvil el envío gratis es una sola línea discreta (sin "te faltan" ni barra) y desaparece cuando ya se tiene (arriba sale "Gratis") */
@media (max-width: 767px) {
  .tp3d-calc .tp3d-envio, .tp3d-calc.tp3d-oscuro .tp3d-envio { background: none; border: 0; padding: 0; gap: 0; }
  .tp3d-calc .tp3d-envio.tp3d-envio-logrado { display: none; }
  .tp3d-calc .tp3d-eg-cab { gap: 8px; align-items: center; }
  .tp3d-calc .tp3d-eg-cab svg { width: 18px; height: 18px; }
  .tp3d-calc .tp3d-eg-cab > div { display: block; font-size: 13px; line-height: 1.4; }
  .tp3d-calc .tp3d-eg-cab strong, .tp3d-calc.tp3d-oscuro .tp3d-eg-cab strong { font-size: 13px; font-weight: 600; }
  .tp3d-calc .tp3d-eg-cab span, .tp3d-calc .tp3d-eg-barra { display: none; }
}

/* v0.20.0: el envío gratis va justo debajo de Piezas, como nota compacta (sin caja), para que se entienda que cuenta el importe de las piezas sin IVA */
.tp3d-calc .tp3d-sin-iva { font-size: 12px; font-weight: 400; color: var(--tp-muted); }
.tp3d-calc .tp3d-envio, .tp3d-calc.tp3d-oscuro .tp3d-envio { background: none; border: 0; border-radius: 0; padding: 0 0 2px; gap: 5px; color: var(--tp-muted); }
.tp3d-calc .tp3d-eg-cab { gap: 8px; align-items: flex-start; }
.tp3d-calc .tp3d-eg-cab svg { width: 18px; height: 18px; margin-top: 1px; }
.tp3d-calc .tp3d-eg-cab > div { display: block; font-size: 13px; line-height: 1.4; }
.tp3d-calc .tp3d-eg-cab strong, .tp3d-calc.tp3d-oscuro .tp3d-eg-cab strong { font-size: 13px; font-weight: 600; }
.tp3d-calc .tp3d-eg-cab strong::after { content: ". "; }
.tp3d-calc .tp3d-envio-logrado .tp3d-eg-cab strong::after { content: " "; }
.tp3d-calc .tp3d-eg-cab b, .tp3d-calc.tp3d-oscuro .tp3d-eg-cab b { color: var(--tp-ink); font-weight: 600; }
.tp3d-calc .tp3d-eg-barra { height: 4px; margin-left: 26px; }

/* v0.22.0: calculadora entera desde el principio. Sin piezas: caja de subir dentro del visor, opciones de ejemplo y resumen vacío */
.tp3d-calc .tp3d-cv-w > .tp3d-drop, .tp3d-calc .tp3d-cv-w > .tp3d-cargando { position: absolute; inset: 0; margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 16px; z-index: 2; }
.tp3d-calc .tp3d-cv-w > .tp3d-drop[hidden], .tp3d-calc .tp3d-cv-w > .tp3d-cargando { display: none; }
.tp3d-calc.tp3d-recuperando .tp3d-cv-w > .tp3d-cargando { display: flex; }
.tp3d-calc.tp3d-recuperando .tp3d-cv-w > .tp3d-drop { display: none; }
.tp3d-calc.tp3d-oscuro .tp3d-cv-w > .tp3d-drop { border-color: #4a5e2a; background: #1a1e17; }
.tp3d-calc.tp3d-vacio #tp3d-cv { visibility: hidden; }
.tp3d-calc.tp3d-vacio .tp3d-pos-visor, .tp3d-calc.tp3d-vacio #tp3d-panel { display: none; }
.tp3d-calc .tp3d-panel-vacio, .tp3d-calc .tp3d-lista-vacia { display: none; }
.tp3d-calc.tp3d-vacio .tp3d-panel-vacio { display: block; border: 1px solid var(--tp-line); border-radius: 10px; background: var(--tp-bg); margin-bottom: 16px; }
.tp3d-calc.tp3d-vacio .tp3d-lista-vacia { display: block; margin: 0; padding: 14px; text-align: center; font-size: 14px; color: var(--tp-muted); border: 1px dashed var(--tp-line); border-radius: 8px; }
.tp3d-calc .tp3d-pv-cab { padding: 14px 16px; border-bottom: 1px solid var(--tp-line); font-weight: 700; color: var(--tp-ink); }
.tp3d-calc .tp3d-pv-cuerpo { padding: 14px 16px; }
.tp3d-calc .tp3d-panel-vacio select { opacity: .55; pointer-events: none; }
.tp3d-calc .tp3d-pv-nota { margin: 12px 0 0; font-size: 13.5px; color: var(--tp-muted); }
.tp3d-calc.tp3d-vacio .tp3d-carro-cab .tp3d-link { visibility: hidden; }
@media (max-width: 820px) { .tp3d-calc .tp3d-cv-w > .tp3d-drop .tp3d-solo-pc { display: none; } }
@media (max-width: 820px) {
  .tp3d-calc .tp3d-panel-vacio { order: 2; }
  .tp3d-calc.tp3d-vacio .tp3d-panel-vacio { margin-bottom: 0; }
}

/* v0.23.0: una sola caja del total bajo el visor (sin resumen grande); "Tus piezas" en su caja a la derecha, bajo las opciones */
.tp3d-calc .tp3d-pie { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 20px; row-gap: 12px; align-items: start; margin: 16px 0 0; padding: 16px 18px; border: 1px solid var(--tp-line); border-radius: 10px; background: var(--tp-bg); box-shadow: none; overflow: visible; }
.tp3d-calc.tp3d-oscuro .tp3d-pie { background: #161a14; border-color: #343a30; box-shadow: none; }
.tp3d-calc .tp3d-pie > * { width: auto; max-width: none; flex: none; margin: 0; }
.tp3d-calc .tp3d-tot-izq { display: grid; gap: 3px; min-width: 0; }
.tp3d-calc .tp3d-tot-tit { margin: 0; font-size: 13.5px; color: var(--tp-muted); line-height: 1.35; }
.tp3d-calc .tp3d-tot-imp { margin: 0; line-height: 1.15; }
.tp3d-calc .tp3d-tot-imp strong { font-size: 28px; font-weight: 700; color: var(--tp-accent); font-variant-numeric: tabular-nums; }
.tp3d-calc.tp3d-oscuro .tp3d-tot-imp strong { color: #c5e08a; }
.tp3d-calc .tp3d-tot-imp small { color: var(--tp-muted); font-size: 13px; }
.tp3d-calc .tp3d-suma { margin: 0; font-size: 13px; line-height: 1.45; color: var(--tp-muted); }
.tp3d-calc .tp3d-suma[hidden] { display: none; }
.tp3d-calc .tp3d-suma .tp3d-gratis { color: var(--tp-ok); font-weight: 700; }
.tp3d-calc.tp3d-oscuro .tp3d-suma .tp3d-gratis { color: #9bc53d; }
.tp3d-calc .tp3d-tot-op { justify-self: start; margin-top: 5px; padding: 0; font-size: 13px; font-weight: 500; text-decoration: underline; text-align: left; }
.tp3d-calc .tp3d-tot-op[hidden] { display: none; }
.tp3d-calc .tp3d-pie .tp3d-acciones { grid-column: 2; grid-row: 1; align-self: center; display: grid; gap: 8px; justify-items: center; }
.tp3d-calc .tp3d-pie .tp3d-acciones .tp3d-btn { padding: 12px 30px; font-size: 16px; }
.tp3d-calc .tp3d-pie .tp3d-pago { gap: 6px; }
.tp3d-calc .tp3d-pie .tp3d-pago-tit { font-size: 12.5px; font-weight: 400; color: var(--tp-muted); }
.tp3d-calc .tp3d-pie .tp3d-pago-met { max-width: 240px; gap: 5px; }
.tp3d-calc .tp3d-pie .tp3d-pago-met img { height: 20px !important; }
.tp3d-calc .tp3d-pie .tp3d-pago-met span { font-size: 11px; padding: 1px 6px; }
.tp3d-calc .tp3d-pie > .tp3d-minimo, .tp3d-calc .tp3d-pie > .tp3d-fuera, .tp3d-calc .tp3d-pie > .tp3d-envio, .tp3d-calc .tp3d-pie > .tp3d-tot-ext { grid-column: 1 / -1; }
.tp3d-calc .tp3d-pie > .tp3d-envio { padding: 0; }
.tp3d-calc .tp3d-tot-ext { display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid var(--tp-line); }
.tp3d-calc.tp3d-oscuro .tp3d-tot-ext { border-top-color: #343a30; }
.tp3d-calc .tp3d-tot-ext[hidden], .tp3d-calc .tp3d-oculto { display: none !important; }
.tp3d-calc .tp3d-tot-ext .tp3d-cupon { margin: 0; }
.tp3d-calc .tp3d-tot-ext .tp3d-cupon-msg { margin: -4px 0 0; }
.tp3d-calc .tp3d-tot-ext .tp3d-envio-txt { margin: -6px 0 0; }
.tp3d-calc .tp3d-der > .tp3d-carro { margin-top: 16px; }
.tp3d-calc .tp3d-carro { border: 1px solid var(--tp-line); border-radius: 10px; background: var(--tp-bg); padding: 0 0 12px; overflow: hidden; }
.tp3d-calc.tp3d-oscuro .tp3d-carro { background: #161a14; border-color: #343a30; }
.tp3d-calc .tp3d-carro .tp3d-carro-cab { margin: 0 0 12px; padding: 13px 18px; border-bottom: 1px solid var(--tp-line); font-size: 15.5px; }
.tp3d-calc.tp3d-oscuro .tp3d-carro .tp3d-carro-cab { border-bottom-color: #343a30; }
.tp3d-calc .tp3d-carro > :not(.tp3d-carro-cab) { margin-left: 12px; margin-right: 12px; }
@media (max-width: 820px) {
  .tp3d-calc .tp3d-der > .tp3d-carro { margin-top: 0; }
  .tp3d-calc .tp3d-pie { order: 4; margin-top: 0; padding: 14px; grid-template-columns: minmax(0, 1fr); }
  .tp3d-calc .tp3d-pie .tp3d-tot-izq { order: 1; }
  .tp3d-calc .tp3d-pie > .tp3d-minimo { order: 2; }
  .tp3d-calc .tp3d-pie > .tp3d-fuera { order: 3; }
  .tp3d-calc .tp3d-pie .tp3d-acciones { order: 4; grid-column: 1; grid-row: auto; justify-items: stretch; }
  .tp3d-calc .tp3d-pie .tp3d-pago { justify-items: center; }
  .tp3d-calc .tp3d-pie .tp3d-pago-met { max-width: none; }
  .tp3d-calc .tp3d-pie > .tp3d-envio { order: 5; }
  .tp3d-calc .tp3d-pie > .tp3d-tot-ext { order: 6; }
}
.tp3d-calc .tp3d-suma > span { white-space: nowrap; }
.tp3d-calc.tp3d-vacio .tp3d-panel-vacio { margin-bottom: 0; }
/* v0.23.1: columna del precio de ancho fijo, para que todas las filas de "Tus piezas" queden alineadas aunque una ponga "4 × 3,02 € · sin IVA" */
.tp3d-calc .tp3d-fila { grid-template-columns: 40px minmax(0, 1fr) auto 122px auto; }
.tp3d-calc .tp3d-fila .tp3d-precio small { white-space: normal; }
@media (max-width: 820px) {
  .tp3d-calc .tp3d-fila { grid-template-columns: 40px minmax(0, 1fr) 104px auto; }
}
/* v0.23.2: avisos ("Hemos recuperado tus piezas…") en su propia línea a todo el ancho de la caja del total,
   y si la columna del visor es estrecha (pantallas de portátil, Divi con márgenes) la caja del total se pone en una columna */
.tp3d-calc .tp3d-pie > .tp3d-estado { grid-column: 1 / -1; margin: 0; font-size: 13.5px; }
/* (sin apilar en ordenador: David prefiere el botón siempre a la derecha) */
.tp3d-calc .tp3d-pie .tp3d-pago-met { max-width: 200px; }
@media (max-width: 820px) {
  .tp3d-calc .tp3d-pie > .tp3d-estado { order: 5; }
  .tp3d-calc .tp3d-pie > .tp3d-envio { order: 6; }
  .tp3d-calc .tp3d-pie > .tp3d-tot-ext { order: 7; }
}
/* v0.23.2: la calculadora ocupa siempre todo el ancho disponible (en Divi el módulo puede encogerla al contenido mientras no hay piezas) */
.tp3d-calc { width: 100%; }
.tp3d-calc .tp3d-tot-op { white-space: normal; max-width: 100%; }

/* v0.23.6: la lista de colores se ve entera (solo hace scroll si no cabe en la pantalla) */
.tp3d-calc .tp3d-cs-list { max-height: 70vh; max-height: 70dvh; }
