/* ========================================================
   KREA PRINT 3D - CALCULADORA DE COSTOS DE IMPRESIÓN 3D
   Diseño organizado (Perfil, Gastos fijos, Pieza, Multiplicador)
   con paleta oficial verde/blanco/oscuro y 100% responsive
   ======================================================== */

.krea-calc-page {
  max-width: 100%;
  margin: 0 auto;
  padding: 18px 0 72px;
}

/* ── Header Minimalista (sin caja pesada) ── */
.calc-hero {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 4px 2px 14px;
  margin-bottom: 6px;
  box-shadow: none;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.calc-hero-title {
  margin: 0 0 2px;
  font-size: clamp(1.3rem, 2.5vw, 1.85rem);
  font-weight: 800;
  color: #11281d;
  line-height: 1.2;
}

.calc-hero-sub {
  margin: 0;
  font-size: 0.85rem;
  color: #3c5447;
  line-height: 1.4;
}

.calc-reset-top-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.78);
  color: #16231c;
  border: 1px solid rgba(22, 35, 28, 0.12);
  border-radius: 9999px;
  padding: 8px 14px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

/* ── Acordeones colapsables para Perfil y Gastos fijos ── */
.calc-accordion {
  padding: 0 !important;
  overflow: visible;
}

.calc-acc-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  cursor: pointer;
  user-select: none;
}

.calc-acc-summary::-webkit-details-marker {
  display: none;
}

.calc-acc-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.calc-acc-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 9999px;
  background: #eef8f1;
  color: var(--store-primary-green, #008726);
  font-size: 0.74rem;
  font-weight: 700;
}

.calc-acc-chevron {
  color: #4b6355;
  flex-shrink: 0;
  transition: transform 0.22s ease;
}

.calc-accordion[open] .calc-acc-chevron {
  transform: rotate(180deg);
  color: var(--store-pill-active, #009e2e);
}

.calc-acc-body {
  padding: 4px 20px 20px;
  border-top: 1px solid #edf3ef;
}

.calc-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 158, 46, 0.12);
  color: var(--store-primary-green, #008726);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 9999px;
  margin-bottom: 8px;
}

.calc-hero-title {
  margin: 0 0 6px;
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  font-weight: 800;
  color: #11281d;
  line-height: 1.2;
}

.calc-hero-title span {
  color: var(--store-primary-green, #008726);
}

.calc-hero-sub {
  margin: 0;
  font-size: 0.92rem;
  color: #3c5447;
  max-width: 680px;
  line-height: 1.5;
}

.calc-reset-top-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  color: #16231c;
  border: 1px solid rgba(22, 35, 28, 0.14);
  border-radius: 9999px;
  padding: 10px 18px;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.calc-reset-top-btn:hover {
  background: #f0f7f2;
  border-color: var(--store-primary-green, #008726);
  color: var(--store-primary-green, #008726);
}

/* ── Banner de Diseño MakerWorld (compacto y sutil) ── */
.calc-design-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(17, 40, 29, 0.08);
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 16px;
  color: #11281d;
}

.calc-design-banner strong {
  font-size: 0.92rem;
  color: var(--store-primary-green, #008726);
}

.calc-design-banner p {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: #3c5447;
  line-height: 1.4;
}

.calc-design-ext-link {
  padding: 7px 14px;
  border-radius: 9999px;
  background: #ffffff;
  border: 1px solid rgba(0, 135, 38, 0.24);
  color: var(--store-primary-green, #008726);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  flex-shrink: 0;
}

.calc-design-ext-link:hover {
  background: #e6f6ec;
}

/* ── Grid Principal 2 Columnas ── */
.calc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(330px, 0.92fr);
  gap: 20px;
  align-items: start;
}

.calc-inputs-col,
.calc-summary-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  max-width: 100%;
}

/* ── Tarjetas Blancas Minimalistas ── */
.calc-card {
  background: var(--store-card-white, #ffffff);
  border-radius: 20px;
  padding: 22px 24px;
  box-shadow: 0 2px 14px rgba(17, 40, 29, 0.05);
  border: 1px solid rgba(17, 40, 29, 0.07);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

/* ── En modo Cotizador de Diseños: una sola tarjeta unificada dividida en 2 ── */
.calc-layout.is-design-quote {
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid rgba(17, 40, 29, 0.08);
  box-shadow: 0 18px 48px rgba(17, 40, 29, 0.10);
  overflow: hidden;
  gap: 0;
  align-items: stretch;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.95fr);
}

.calc-layout.is-design-quote .calc-inputs-col {
  padding: 26px 28px;
  gap: 0;
}

.calc-layout.is-design-quote .calc-card {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

.calc-layout.is-design-quote .calc-summary-col {
  position: static;
}

.calc-layout.is-design-quote .calc-summary-card {
  height: 100%;
  border-radius: 0;
  border: none;
  box-shadow: none;
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.calc-card-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.calc-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.calc-card-title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
  color: #11281d;
}

.calc-card-hint {
  margin: 3px 0 0;
  font-size: 0.8rem;
  color: #5b7265;
}

/* ── Perfil: botones + Nuevo / Eliminar / Guardar ── */
.calc-profile-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.calc-icon-text-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f4faf6;
  color: var(--store-primary-green, #008726);
  border: 1px solid rgba(0, 135, 38, 0.22);
  border-radius: 9999px;
  padding: 6px 13px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.calc-icon-text-btn:hover {
  background: #e6f6ec;
}

.calc-icon-danger-btn {
  width: 34px;
  height: 34px;
  border-radius: 9999px;
  border: 1px solid rgba(220, 38, 38, 0.2);
  background: rgba(220, 38, 38, 0.06);
  color: #dc2626;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s ease;
}

.calc-icon-danger-btn:hover:not(:disabled) {
  background: rgba(220, 38, 38, 0.14);
}

.calc-icon-danger-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.calc-profile-name-row {
  margin-top: 12px;
}

.calc-input-plain {
  padding: 0 14px !important;
}

.calc-save-profile-btn {
  margin-top: 14px;
  width: 100%;
  height: 44px;
  border-radius: 12px;
  border: none;
  background: var(--store-pill-active, #009e2e);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 158, 46, 0.24);
  transition: all 0.18s ease;
}

.calc-save-profile-btn:hover {
  background: var(--store-primary-green, #008726);
  transform: translateY(-1px);
}

.calc-save-profile-btn.is-saved {
  background: #16231c;
}

.calc-profile-io-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.calc-io-btn {
  height: 36px;
  border-radius: 10px;
  border: 1px solid #dbe5df;
  background: #f9fbfa;
  color: #243b2f;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.calc-io-btn:hover {
  background: #eef8f1;
  border-color: var(--store-pill-active, #009e2e);
  color: var(--store-primary-green, #008726);
}

/* ── Presets tipo píldora (Material) ── */
.calc-presets-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.calc-preset-pill {
  border: 1px solid rgba(0, 135, 38, 0.22);
  background: #f4faf6;
  color: #164428;
  border-radius: 9999px;
  padding: 6px 13px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.calc-preset-pill:hover {
  border-color: var(--store-pill-active, #009e2e);
  background: #e6f6ec;
}

.calc-preset-pill.active {
  background: var(--store-pill-active, #009e2e);
  color: #ffffff;
  border-color: var(--store-pill-active, #009e2e);
  box-shadow: 0 3px 10px rgba(0, 158, 46, 0.25);
}

/* ── Campos de Formulario ── */
.calc-fields-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.calc-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calc-fields-grid .calc-field > .calc-input-wrap,
.calc-fields-grid .calc-field > .calc-select,
.calc-fields-grid .calc-field > .krea-combo {
  margin-top: auto;
}

.calc-field-full {
  grid-column: 1 / -1;
}

.calc-extras-margin-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f4faf6;
  border: 1px solid rgba(0, 135, 38, 0.14);
}

.calc-extras-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.calc-range-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.calc-range {
  flex: 1;
  accent-color: var(--store-pill-active, #009e2e);
  height: 6px;
  cursor: pointer;
}

.calc-label-note {
  font-size: 0.74rem;
  font-weight: 600;
  color: #5b7265;
}

/* ── Modo Cotizador de Diseños (cliente) ── */
.calc-layout.is-design-quote .calc-maker-only {
  display: none !important;
}

.calc-layout.is-design-quote .calc-client-only {
  display: block !important;
}

.calc-client-specs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.calc-client-spec-box {
  background: #f4faf6;
  border: 1px solid rgba(0, 135, 38, 0.16);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.calc-client-spec-box span {
  font-size: 0.75rem;
  color: #5b7265;
  font-weight: 600;
}

.calc-client-spec-box strong {
  font-size: 0.96rem;
  color: #11281d;
  font-weight: 700;
}

.calc-client-notice {
  margin: 0 0 16px;
  padding: 11px 13px;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fde68a;
  font-size: 0.78rem;
  line-height: 1.45;
}

.calc-client-notice strong {
  color: #ffffff;
}

.calc-label {
  display: block;
  font-size: 0.83rem;
  font-weight: 600;
  color: #243b2f;
}

.calc-filament-picker {
  margin-bottom: 16px;
}

.calc-filament-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f4faf6;
  border: 1px solid rgba(0, 135, 38, 0.16);
}

.calc-filament-preview img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
  background: #ffffff;
  padding: 2px;
  flex-shrink: 0;
}

.calc-filament-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.calc-filament-meta strong {
  font-size: 0.82rem;
  color: #11281d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calc-filament-meta span {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--store-primary-green, #008726);
}

.calc-filament-meta span.is-oos {
  color: #dc2626;
}

.calc-field-desc {
  margin: -2px 0 2px;
  font-size: 0.74rem;
  color: #6b8074;
  line-height: 1.35;
  font-style: italic;
}

.calc-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.calc-input,
.calc-select {
  width: 100%;
  height: 44px;
  border: 1.5px solid #dbe5df;
  border-radius: 12px;
  padding: 0 48px 0 14px;
  font-family: inherit;
  font-size: 0.93rem;
  font-weight: 600;
  color: #111827;
  background: #f9fbfa;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.calc-input {
  -moz-appearance: textfield;
}

.calc-select {
  padding-right: 34px;
  cursor: pointer;
}

.calc-input.has-prefix {
  padding-left: 30px;
}

.calc-input[readonly] {
  background: #eef3f0;
  color: #5b7265;
  cursor: not-allowed;
}

.calc-input::-webkit-outer-spin-button,
.calc-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.calc-input:focus,
.calc-select:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--store-pill-active, #009e2e);
  box-shadow: 0 0 0 3px rgba(0, 158, 46, 0.12);
}

.calc-prefix,
.calc-suffix {
  position: absolute;
  font-size: 0.8rem;
  font-weight: 700;
  color: #5b7265;
  pointer-events: none;
}

.calc-prefix {
  left: 12px;
}

.calc-suffix {
  right: 12px;
}

/* ── Multiplicador de Ganancia ── */
.calc-multiplier-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.calc-mult-pill {
  height: 40px;
  border-radius: 10px;
  border: 1.5px solid #dbe5df;
  background: #f9fbfa;
  color: #11281d;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.calc-mult-pill:hover {
  border-color: var(--store-pill-active, #009e2e);
  background: #f0f9f3;
}

.calc-mult-pill.active {
  background: var(--store-pill-active, #009e2e);
  color: #ffffff;
  border-color: var(--store-pill-active, #009e2e);
  box-shadow: 0 4px 12px rgba(0, 158, 46, 0.25);
}

.calc-references {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e8efe9;
}

.calc-references summary {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--store-primary-green, #008726);
  cursor: pointer;
  user-select: none;
}

.calc-ref-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
  color: #4f6659;
}

.calc-ref-list strong {
  color: #11281d;
}

/* ── Custom Combobox (reemplaza el dropdown nativo del navegador) ── */
.krea-select-native-hidden {
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 1px !important;
  height: 1px !important;
}

.krea-combo {
  position: relative;
  width: 100%;
}

.krea-combo-trigger {
  width: 100%;
  min-height: 44px;
  border: 1.5px solid #dbe5df;
  border-radius: 12px;
  padding: 8px 38px 8px 14px;
  font-family: inherit;
  font-size: 0.91rem;
  font-weight: 600;
  color: #111827;
  background: #f9fbfa;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.krea-combo-trigger:hover {
  border-color: #b7cec0;
  background: #ffffff;
}

.krea-combo.open .krea-combo-trigger {
  background: #ffffff;
  border-color: var(--store-pill-active, #009e2e);
  box-shadow: 0 0 0 3px rgba(0, 158, 46, 0.12);
}

.krea-combo-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.krea-combo-chevron {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #4b6355;
  pointer-events: none;
  transition: transform 0.2s ease;
}

.krea-combo.open .krea-combo-chevron {
  transform: translateY(-50%) rotate(180deg);
  color: var(--store-pill-active, #009e2e);
}

.krea-combo-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-width: 100%;
  box-sizing: border-box;
  z-index: 60;
  background: #ffffff;
  border: 1.5px solid #dbe5df;
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(16, 35, 24, 0.18);
  padding: 6px;
  display: none;
  max-height: 290px;
  overflow-y: auto;
  overflow-x: hidden;
}

.krea-combo.open .krea-combo-menu {
  display: block;
  animation: kreaComboIn 0.15s ease-out;
}

@keyframes kreaComboIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.krea-combo-search-wrap {
  position: sticky;
  top: -6px;
  background: #ffffff;
  padding: 4px 2px 8px;
  z-index: 2;
}

.krea-combo-search {
  width: 100%;
  height: 36px;
  border: 1.5px solid #dbe5df;
  border-radius: 10px;
  padding: 0 12px;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 500;
  color: #111827;
  background: #f6faf7;
  outline: none;
}

.krea-combo-search:focus {
  border-color: var(--store-pill-active, #009e2e);
  background: #ffffff;
}

.krea-combo-group {
  padding: 8px 10px 5px;
  margin-top: 4px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--store-primary-green, #008726);
  border-bottom: 1px solid #edf3ef;
}

.krea-combo-option {
  width: 100%;
  border: none;
  background: transparent;
  border-radius: 12px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 500;
  color: #16231c;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: background 0.14s ease, color 0.14s ease;
}

.krea-combo-opt-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.krea-combo-opt-thumb {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  object-fit: contain;
  background: #f4faf6;
  border: 1px solid #e2ece6;
  padding: 2px;
  flex-shrink: 0;
}

.krea-combo-opt-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.krea-combo-opt-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.krea-combo-opt-price {
  font-size: 0.8rem;
  font-weight: 700;
  color: #11281d;
}

.krea-combo-opt-stock {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
  background: rgba(0, 158, 46, 0.12);
  color: #007a24;
}

.krea-combo-opt-stock.is-oos {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}

.krea-combo-option.selected .krea-combo-opt-price {
  color: #ffffff;
}

.krea-combo-option.selected .krea-combo-opt-stock {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.krea-combo-option:hover {
  background: #eef8f1;
  color: var(--store-primary-green, #008726);
}

.krea-combo-option.selected {
  background: var(--store-pill-active, #009e2e);
  color: #ffffff;
  font-weight: 700;
}

.krea-combo-empty {
  padding: 12px;
  text-align: center;
  font-size: 0.82rem;
  color: #6b8074;
}

@media (max-width: 640px) {
  .krea-combo-option {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 10px;
  }

  .krea-combo-opt-left {
    align-items: flex-start;
  }

  .krea-combo-opt-thumb {
    width: 34px;
    height: 34px;
  }

  .krea-combo-opt-title {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.32;
    font-size: 0.83rem;
  }

  .krea-combo-opt-meta {
    padding-left: 44px;
    justify-content: space-between;
    width: 100%;
  }
}

/* ── Panel Derecho: Resumen ── */
.calc-summary-col {
  position: sticky;
  top: 20px;
}

.calc-summary-card {
  background: linear-gradient(165deg, #17271e 0%, #0f1b14 100%);
  color: #ffffff;
  border-radius: var(--store-card-radius, 22px);
  padding: 24px;
  border: 1px solid rgba(110, 231, 148, 0.16);
  box-shadow: 0 20px 44px rgba(13, 30, 20, 0.24);
}

.calc-summary-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #7ee39b;
  background: rgba(0, 158, 46, 0.16);
  padding: 4px 10px;
  border-radius: 9999px;
  margin: 0 0 10px;
}

.calc-main-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.calc-main-price {
  font-size: clamp(2.2rem, 4vw, 2.85rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.calc-main-usd-ref {
  margin-top: 4px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #7ee39b;
}

.calc-client-currency-toggle {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.calc-layout:not(.is-design-quote) .calc-client-currency-toggle {
  display: none !important;
}

.calc-cur-btn {
  height: 36px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #dbe9e0;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
}

.calc-cur-btn.active {
  background: var(--store-pill-active, #009e2e);
  border-color: var(--store-pill-active, #009e2e);
  color: #ffffff;
}

.calc-main-unit-note {
  font-size: 0.8rem;
  color: #b7d2c2;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.06);
  padding: 4px 10px;
  border-radius: 9999px;
}

/* KPIs secundarios */
.calc-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.calc-kpi-box {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  padding: 13px 14px;
}

.calc-kpi-box.is-profit-box {
  background: rgba(0, 158, 46, 0.12);
  border-color: rgba(110, 231, 148, 0.24);
}

.calc-kpi-label {
  display: block;
  font-size: 0.74rem;
  color: #b7d2c2;
  margin-bottom: 3px;
}

.calc-kpi-val {
  display: block;
  font-size: 1.08rem;
  font-weight: 700;
  color: #ffffff;
}

.calc-kpi-val.is-profit {
  color: #6ee794;
}

/* Barra visual de desglose */
.calc-bar-wrap {
  margin: 16px 0 14px;
}

.calc-bar-track {
  display: flex;
  height: 10px;
  border-radius: 9999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  gap: 2px;
}

.calc-bar-seg {
  height: 100%;
  transition: width 0.25s ease;
}

.seg-filament { background: #22c55e; }
.seg-energy   { background: #38bdf8; }
.seg-wear     { background: #f59e0b; }
.seg-extras   { background: #a855f7; }
.seg-risk     { background: #ef4444; }

/* Lista de desglose */
.calc-breakdown-list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.calc-breakdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #dbe9e0;
}

.calc-breakdown-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.calc-dot {
  width: 9px;
  height: 9px;
  border-radius: 9999px;
  flex-shrink: 0;
}

.calc-breakdown-val {
  font-weight: 700;
  color: #ffffff;
}

.calc-breakdown-total {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 10px;
  margin-top: 4px;
  font-weight: 700;
  color: #ffffff;
}

/* Botones de Acción */
.calc-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.calc-btn-primary,
.calc-btn-secondary {
  width: 100%;
  height: 46px;
  border-radius: 9999px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.2s ease;
}

.calc-btn-primary {
  background: var(--store-pill-active, #009e2e);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(0, 158, 46, 0.35);
}

.calc-btn-primary:hover {
  background: #00b334;
  transform: translateY(-1px);
}

.calc-btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.calc-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.18);
}

.calc-btn-secondary.is-copied {
  background: #22c55e;
  color: #0b2214;
  border-color: #22c55e;
}

.calc-summary-tip {
  margin: 14px 0 0;
  font-size: 0.76rem;
  color: #9cb8a7;
  line-height: 1.45;
  text-align: center;
}

/* ── Responsive ── */
/* ── Barra Flotante Inferior de Precio Final (Móvil / Tablet) ── */
.calc-sticky-bar {
  display: none;
}

@media (max-width: 960px) {
  .krea-calc-page {
    padding-bottom: 108px;
  }

  .calc-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .calc-summary-col {
    position: static;
  }

  .calc-sticky-bar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom, 12px));
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 20px;
    background: rgba(20, 34, 26, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(110, 231, 148, 0.28);
    box-shadow: 0 14px 36px rgba(10, 24, 16, 0.38);
    color: #ffffff;
  }

  .calc-sticky-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  .calc-sticky-eyebrow {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9cb8a7;
  }

  .calc-sticky-price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
  }

  .calc-sticky-price {
    font-size: 1.38rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.1;
  }

  .calc-sticky-usd {
    font-size: 0.78rem;
    font-weight: 700;
    color: #7ee39b;
  }

  .calc-sticky-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
  }

  .calc-sticky-profit {
    font-size: 0.76rem;
    font-weight: 700;
    color: #7ee39b;
    background: rgba(0, 158, 46, 0.18);
    padding: 5px 10px;
    border-radius: 9999px;
  }

  .calc-sticky-summary-btn {
    height: 38px;
    padding: 0 16px;
    border-radius: 9999px;
    border: none;
    background: var(--store-pill-active, #009e2e);
    color: #ffffff;
    font-family: inherit;
    font-size: 0.84rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 158, 46, 0.3);
  }
}

@media (max-width: 600px) {
  .krea-calc-page {
    padding: 10px 0 96px;
  }

  .calc-hero {
    padding: 12px 4px;
  }

  .calc-card {
    padding: 16px 14px;
    border-radius: 18px;
  }

  .calc-acc-summary {
    padding: 16px 14px;
  }

  .calc-acc-left {
    min-width: 0;
    flex-wrap: wrap;
    gap: 6px;
  }

  .calc-fields-grid,
  .calc-client-specs {
    grid-template-columns: minmax(0, 1fr);
  }

  .calc-multiplier-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .calc-summary-card {
    padding: 20px 18px;
  }
}

/* ── Vista previa del diseño en la tarjeta de precio/resumen ── */
.calc-summary-design-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.calc-summary-design-preview img {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.1);
}

.calc-summary-design-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.calc-summary-design-tag {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #4ade80;
}

.calc-summary-design-meta strong {
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.calc-summary-design-meta a {
  font-size: 0.76rem;
  font-weight: 600;
  color: #86efac;
  text-decoration: none;
  margin-top: 2px;
}

.calc-summary-design-meta a:hover {
  text-decoration: underline;
}

/* ═══ PRECIO FINAL EDITABLE, WHATSAPP CLIENTE Y FACTURA PNG ═══ */
.calc-custom-price-box,
.calc-wa-target-box {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calc-wa-target-box {
  margin-bottom: 12px;
}

.calc-dark-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: #a9c5b4;
}

.calc-dark-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 0 10px;
  height: 40px;
}

.calc-dark-input-row:focus-within,
.calc-dark-phone:focus {
  border-color: #4ade80;
  outline: none;
}

.calc-dark-prefix {
  font-size: 0.85rem;
  font-weight: 700;
  color: #7ee39b;
}

.calc-dark-input {
  width: 100%;
  background: transparent;
  border: none;
  color: #ffffff;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  outline: none;
}

.calc-dark-input::placeholder {
  color: rgba(255, 255, 255, 0.42);
  font-weight: 400;
}

.calc-dark-phone {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 0 12px;
  height: 40px;
  box-sizing: border-box;
}

.calc-dark-reset {
  width: 24px;
  height: 24px;
  border-radius: 9999px;
  border: none;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 0.75rem;
  cursor: pointer;
  flex-shrink: 0;
}

.calc-dark-reset[hidden] {
  display: none !important;
}

.calc-btn-invoice {
  background: rgba(74, 222, 128, 0.12);
  border-color: rgba(74, 222, 128, 0.34);
  color: #bbf7d0;
}

.calc-btn-invoice:hover {
  background: rgba(74, 222, 128, 0.22);
}

/* Modal Factura PNG */
.calc-invoice-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.calc-invoice-modal.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.calc-invoice-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 22, 15, 0.72);
  backdrop-filter: blur(6px);
}

.calc-invoice-dialog {
  position: relative;
  z-index: 2;
  width: min(780px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 24px;
  padding: 22px 24px;
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.36);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.calc-invoice-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.calc-invoice-head h2 {
  margin: 0 0 4px;
  font-size: 1.15rem;
  font-weight: 800;
  color: #11281d;
}

.calc-invoice-head p {
  margin: 0;
  font-size: 0.82rem;
  color: #5b7265;
}

.calc-invoice-close {
  width: 34px;
  height: 34px;
  border-radius: 9999px;
  border: 1px solid #dbe5df;
  background: #ffffff;
  color: #11281d;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}

.calc-invoice-fields {
  display: grid;
  grid-template-columns: 1.45fr 1fr 1fr;
  gap: 10px;
}

.calc-inv-upload-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.calc-inv-upload-btn,
.calc-inv-upload-clear {
  height: 36px;
  padding: 0 14px;
  border-radius: 9999px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.calc-inv-upload-btn {
  background: #f0f7f2;
  border: 1px solid #cce3d4;
  color: #11281d;
}

.calc-inv-upload-btn:hover {
  background: #e2f2e7;
}

.calc-inv-upload-clear {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
}

.calc-inv-upload-clear[hidden] {
  display: none !important;
}

.calc-inv-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.calc-inv-field span {
  font-size: 0.74rem;
  font-weight: 700;
  color: #355243;
}

.calc-inv-field input {
  height: 38px;
  border-radius: 10px;
  border: 1px solid #d5e2da;
  padding: 0 10px;
  font-family: inherit;
  font-size: 0.84rem;
  color: #11281d;
}

.calc-invoice-preview-wrap {
  background: #f2f7f4;
  border: 1px solid #e2ece6;
  border-radius: 16px;
  padding: 14px;
  display: flex;
  justify-content: center;
}

.calc-invoice-preview-wrap img {
  max-width: 100%;
  max-height: 400px;
  width: auto;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(10, 26, 17, 0.14);
}

.calc-invoice-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.calc-inv-btn-sec,
.calc-inv-btn-primary,
.calc-inv-btn-wa {
  height: 44px;
  border-radius: 9999px;
  border: none;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0 14px;
  transition: transform 0.16s ease, background 0.16s ease;
}

.calc-inv-btn-sec {
  background: #eef4f0;
  color: #16231c;
}

.calc-inv-btn-primary {
  background: #16231c;
  color: #ffffff;
}

.calc-inv-btn-wa {
  background: #009e2e;
  color: #ffffff;
}

@media (max-width: 600px) {
  .calc-cd-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .calc-invoice-fields,
  .calc-invoice-actions {
    grid-template-columns: 1fr;
  }
}

/* ═══ MODO SOLO MÁQUINA (MAQUILA) ═══ */
.calc-machine-only-box {
  background: #f4f9f6;
  border: 1px solid #d5e6dc;
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 16px;
}

.calc-machine-toggle-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.calc-machine-toggle-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #009e2e;
  cursor: pointer;
  flex-shrink: 0;
}

.calc-machine-toggle-row strong {
  display: block;
  font-size: 0.86rem;
  color: #11281d;
}

.calc-machine-toggle-row small {
  display: block;
  font-size: 0.76rem;
  color: #5b7265;
  line-height: 1.4;
}

.calc-hourly-rate-wrap {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #dcebe2;
}

.calc-hourly-rate-wrap[hidden] {
  display: none !important;
}

.calc-field.is-machine-disabled {
  opacity: 0.48;
  pointer-events: none;
}

/* ═══ BARRA DE DISEÑOS DEL CARRITO (CÁLCULO INDIVIDUAL POR DISEÑO) ═══ */
.calc-cart-designs-bar {
  background: #ffffff;
  border: 1px solid #dbe5df;
  border-radius: 22px;
  padding: 18px 20px;
  margin-bottom: 18px;
  box-shadow: 0 10px 26px rgba(10, 26, 17, 0.06);
}

.calc-cart-designs-bar[hidden] {
  display: none !important;
}

.calc-cd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.calc-cd-title {
  margin: 0 0 2px;
  font-size: 1.05rem;
  font-weight: 800;
  color: #11281d;
}

.calc-cd-sub {
  margin: 0;
  font-size: 0.82rem;
  color: #5b7265;
}

.calc-cd-batch-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.calc-cd-total-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: 9999px;
  background: #f0f7f2;
  border: 1px solid #cce3d4;
  font-size: 0.84rem;
  color: #16231c;
}

.calc-cd-total-pill strong {
  color: #008726;
  font-weight: 800;
}

.calc-cd-btn,
.calc-cd-wa-btn {
  height: 36px;
  padding: 0 14px;
  border-radius: 9999px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.calc-cd-btn {
  background: #16231c;
  color: #ffffff;
}

.calc-cd-wa-btn {
  background: #009e2e;
  color: #ffffff;
}

.calc-cd-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}

.calc-cd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  border: 2px solid #e5ece8;
  background: #f9fbfa;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.calc-cd-item:hover {
  border-color: #9ed9b1;
  transform: translateY(-1px);
}

.calc-cd-item.active {
  border-color: #009e2e;
  background: #eef9f1;
}

.calc-cd-item img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: #e2ece6;
}

.calc-cd-item-info {
  min-width: 0;
  flex: 1;
}

.calc-cd-item-name {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #11281d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calc-cd-item-meta {
  display: block;
  font-size: 0.72rem;
  color: #5b7265;
}

.calc-cd-item-price {
  font-size: 0.82rem;
  font-weight: 800;
  color: #008726;
  background: #ffffff;
  border: 1px solid #cce3d4;
  border-radius: 9999px;
  padding: 3px 9px;
  flex-shrink: 0;
}
