/* =========================================================
   Configurador "monta tu propio ERP"
   ========================================================= */
.cfg-wrap { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; }
@media (max-width: 940px) { .cfg-wrap { grid-template-columns: 1fr; } }

/* Toggle modalidad */
.modality {
  display: inline-flex; background: #fff; border: 1px solid var(--c-line); border-radius: 999px;
  padding: 4px; box-shadow: var(--shadow-sm); margin-bottom: 22px;
}
.modality button {
  border: 0; background: transparent; font-family: inherit; font-weight: 700; font-size: .92rem;
  color: var(--c-ink-soft); padding: .6em 1.2em; border-radius: 999px; cursor: pointer;
}
.modality button.active { background: var(--c-primary); color: #fff; }

/* Catálogo de módulos */
.mod-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 620px) { .mod-grid { grid-template-columns: 1fr; } }

.mod {
  position: relative; background: #fff; border: 1.5px solid var(--c-line); border-radius: 12px;
  padding: 16px; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease;
  display: flex; gap: 12px;
}
.mod:hover { border-color: #cdd9e8; }
.mod.on { border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--c-primary-l); }
.mod.included { cursor: default; border-color: var(--c-ok); background: var(--c-ok-bg); }
.mod.disabled { opacity: .5; cursor: not-allowed; background: #f7f9fc; }
.mod.disabled .price { color: var(--c-muted); }
.mod .check {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--c-line);
  display: grid; place-items: center; color: #fff; font-size: .8rem; margin-top: 2px;
}
.mod.on .check { background: var(--c-primary); border-color: var(--c-primary); }
.mod.included .check { background: var(--c-ok); border-color: var(--c-ok); }
.mod .ic { font-size: 1.3rem; }
.mod h4 { margin: 0 0 3px; font-size: 1rem; }
.mod p { margin: 0; font-size: .84rem; color: var(--c-muted); }
.mod .price { margin-top: 7px; font-weight: 800; color: var(--c-primary); font-size: .9rem; }
.mod .tagdone { display: inline-block; font-size: .68rem; font-weight: 800; color: var(--c-ok); background: #fff; border: 1px solid var(--c-ok); padding: .1em .5em; border-radius: 999px; margin-left: 6px; vertical-align: middle; }

.cfg-section-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--c-muted); font-weight: 700; margin: 26px 0 12px; }

/* Resumen sticky */
.summary { position: sticky; top: 86px; }
.summary .panel { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-md); }
.summary h3 { margin: 0 0 4px; }
.sum-line { display: flex; justify-content: space-between; font-size: .9rem; padding: .42em 0; border-bottom: 1px dashed var(--c-line); color: var(--c-ink-soft); }
.sum-line.base { color: var(--c-ink); font-weight: 600; }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; margin: 14px 0; }
.sum-total .big { font-size: 2.1rem; font-weight: 800; color: var(--c-ink); }
.sum-total .per { color: var(--c-muted); font-size: .9rem; }
.sum-empty { color: var(--c-muted); font-size: .88rem; padding: .42em 0; }

.cfg-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.cfg-actions .or { text-align: center; font-size: .8rem; color: var(--c-muted); position: relative; margin: 2px 0; }

/* Form contacto/cierre */
.cfg-form .field { margin-bottom: 12px; }
.cfg-overlay {
  position: fixed; inset: 0; background: rgba(15,31,51,.5); display: none; place-items: center;
  z-index: 200; padding: 20px;
}
.cfg-overlay.show { display: grid; }
.cfg-modal { background: #fff; border-radius: var(--radius); max-width: 480px; width: 100%; padding: 28px; box-shadow: var(--shadow-lg); }
.cfg-modal h3 { margin-top: 0; }
.cfg-close { float: right; border: 0; background: transparent; font-size: 1.4rem; cursor: pointer; color: var(--c-muted); line-height: 1; }
