/* Clappbox Descuentos por Volumen — frontend
   Usa las variables de Kadence cuando existen (palette1 = color de marca del tema)
   y cae en neutros si el tema es otro. */

.cbpm-box {
	--cbpm-accent: var(--global-palette1, #2563eb);
	--cbpm-text:   var(--global-palette3, #1d2327);
	--cbpm-muted:  var(--global-palette5, #646970);
	--cbpm-line:   var(--global-palette7, #e5e7eb);
	--cbpm-bg:     var(--global-palette8, #f8f9fb);
	margin: 1.25em 0 1.5em;
	max-width: 560px;
	color: var(--cbpm-text);
}

.cbpm-title {
	margin: 0 0 .5em;
	font-size: 1em;
	font-weight: 600;
	letter-spacing: .01em;
}

/* Tabla de escalas */
.cbpm-table-wrap { margin-bottom: 1em; overflow-x: auto; }
.cbpm-table { width: 100%; border-collapse: collapse; font-size: .95em; margin: 0; }
.cbpm-table th, .cbpm-table td { padding: .5em .75em; border-bottom: 1px solid var(--cbpm-line); text-align: left; white-space: nowrap; }
.cbpm-table thead th { font-weight: 600; font-size: .85em; text-transform: uppercase; letter-spacing: .04em; color: var(--cbpm-muted); border-bottom-width: 2px; }
.cbpm-table td small { color: var(--cbpm-muted); font-size: .8em; margin-left: .25em; }
.cbpm-table .cbpm-col-disc { text-align: right; color: var(--cbpm-accent); font-weight: 600; }
.cbpm-table tbody tr:last-child td { border-bottom: 0; }

/* Calculadora */
.cbpm-calc { background: var(--cbpm-bg); border: 1px solid var(--cbpm-line); border-radius: 10px; padding: 1em 1.1em; }
.cbpm-summary { display: grid; gap: .35em; margin: .5em 0 .25em; }
.cbpm-line { display: flex; justify-content: space-between; align-items: baseline; gap: 1em; }
.cbpm-line span { color: var(--cbpm-muted); font-size: .9em; }
.cbpm-line strong { font-size: 1.05em; }
.cbpm-line-total { border-top: 1px dashed var(--cbpm-line); padding-top: .45em; margin-top: .2em; }
.cbpm-line-total strong { font-size: 1.35em; color: var(--cbpm-accent); }
.cbpm-line-next small { color: var(--cbpm-muted); font-size: .82em; }
.cbpm-line-tier strong { color: var(--cbpm-accent); }

/* Formulario de consulta */
.cbpm-form { margin-top: .9em; }
.cbpm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .6em .8em; }
@media (max-width: 560px) { .cbpm-grid { grid-template-columns: 1fr; } }
.cbpm-field { display: flex; flex-direction: column; gap: .25em; margin: 0 0 .6em; font-size: .9em; }
.cbpm-field span { color: var(--cbpm-muted); font-size: .85em; }
.cbpm-field input, .cbpm-field textarea { width: 100%; padding: .55em .7em; border: 1px solid var(--cbpm-line); border-radius: 6px; background: #fff; font: inherit; }
.cbpm-field-qty input { max-width: 140px; font-size: 1.1em; font-weight: 600; }
.cbpm-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.cbpm-actions { display: flex; align-items: center; gap: .9em; flex-wrap: wrap; margin-top: .4em; }
.cbpm-submit { cursor: pointer; }
.cbpm-wa-hint { font-size: .82em; color: var(--cbpm-muted); }
.cbpm-feedback { margin: .7em 0 0; padding: .6em .8em; border-radius: 6px; background: rgba(0, 185, 124, .12); color: #0b6b4a; font-size: .9em; }
.cbpm-feedback.is-error { background: rgba(255, 92, 93, .12); color: #a12b2c; }

/* Precio oculto / catálogo */
.cbpm-hidden-price { font-weight: 600; }
.cbpm-staff-note { font-size: .75em; color: var(--cbpm-muted); font-weight: 400; }
.cbpm-badge { display: inline-block; margin: .25em 0 .4em; padding: .15em .55em; border-radius: 999px; font-size: .72em; font-weight: 600; letter-spacing: .02em; color: var(--global-palette1, #2563eb); background: color-mix(in srgb, var(--global-palette1, #2563eb) 12%, transparent); }
@supports not (background: color-mix(in srgb, red 10%, transparent)) { .cbpm-badge { background: rgba(37, 99, 235, .12); } }

/* Carrito */
.woocommerce-cart .product-price del { opacity: .55; margin-right: .35em; }
