/* =========================================================================
   Grupo Beyond — cotizador.css
   Motor de cotización: widget de la ficha + modal "Mi cotización" (jul 2026).

   Archivo SEPARADO de main.css a propósito: main.css sostiene todo el sitio y
   el PageSpeed 99, y esto es un módulo nuevo que evoluciona aparte.

   Diseño adoptado de la propuesta de Edgar (jul 2026), con la tipografía del
   tema en vez de Archivo desde Google Fonts: un <link> a fonts.googleapis.com
   es render-blocking externo y es justo lo que hoy no cargamos.

   Los tokens se declaran sobre .gbc-widget / .gbc-modal, NO sobre :root, para
   no filtrar variables al resto del sitio ni chocar con main.css.
   Prefijo de clase: .gbc-
   ========================================================================= */

.gbc-widget,
.gbc-modal {
	--gbc-navy:      #004D71;
	--gbc-navy-dk:   #003A56;
	--gbc-teal:      #1AA5B5;
	--gbc-teal-bg:   #E6F6F8;
	--gbc-ink:       #1B2A33;
	--gbc-ink-soft:  #54646E;
	--gbc-line:      #E2E8EC;
	--gbc-card:      #FFFFFF;
	--gbc-soft:      #F6F8F9;
	--gbc-ok:        #137A5B;
	--gbc-ok-bg:     #E4F4EE;
	--gbc-warn:      #8A5B00;
	--gbc-warn-bg:   #FBF1DC;
	--gbc-bad:       #9A3B3B;
	--gbc-bad-bg:    #F6EAEA;
	--gbc-radius:    14px;
}

/*
 * Peso tipográfico.
 *
 * El tema carga Inter Variable (font-weight 100 900), así que los pesos 700/800
 * SÍ existen — no hace falta traer Archivo desde Google Fonts.
 *
 * Pero Inter se lee ópticamente más ligera que Archivo al mismo número: donde la
 * propuesta usaba Archivo 700, aquí va Inter 800 para igualar la contundencia.
 *
 * ⚠️ main.css declara `font-display: optional`. En una visita sin la fuente en
 * caché (o tras un hard refresh) el navegador usa el fallback Arial y NUNCA
 * intercambia en esa carga: ahí el 800 colapsa a Bold y el widget se ve más
 * flaco. No es un bug de este CSS. Cambiar a `font-display: swap` lo arreglaría
 * a costa de un posible FOUT — es decisión de main.css, no de este módulo.
 */
.gbc-widget {
	color: var(--gbc-ink);
	line-height: 1.55;
	font-size: 15px;
}

/* -------------------------------------------------------------------------
   Badge de stock del color activo
   ------------------------------------------------------------------------- */

.gbc-stockbadge {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	background: var(--gbc-ok-bg);
	color: var(--gbc-ok);
	border-radius: 99px;
	padding: 6px 14px;
	font-size: 13px;
	font-weight: 700;
	margin-bottom: 14px;
}

.gbc-stockbadge i {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: currentColor;
	flex: none;
}

.gbc-stockbadge.is-mid,
.gbc-stockbadge.is-low {
	background: var(--gbc-warn-bg);
	color: var(--gbc-warn);
}

.gbc-stockbadge.is-out {
	background: var(--gbc-bad-bg);
	color: var(--gbc-bad);
}

/* -------------------------------------------------------------------------
   Paneles
   ------------------------------------------------------------------------- */

.gbc-panel {
	background: var(--gbc-card);
	border: 1px solid var(--gbc-line);
	border-radius: var(--gbc-radius);
	padding: 20px 22px;
	margin-bottom: 14px;
}

.gbc-panel-h {
	font-size: 17px;
	font-weight: 800;
	letter-spacing: -.015em;
	margin: 0 0 14px;
	line-height: 1.3;
	color: var(--gbc-ink);
}

.gbc-panel-h small {
	font-weight: 500;
	font-size: 12.5px;
	letter-spacing: 0;
	color: var(--gbc-ink-soft);
}

.gbc-fine {
	font-size: 11.5px;
	color: var(--gbc-ink-soft);
	margin: 10px 0 0;
	line-height: 1.5;
}

/* -------------------------------------------------------------------------
   Escalas de volumen
   ------------------------------------------------------------------------- */

.gbc-escalas {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
	gap: 10px;
}

.gbc-tier {
	border: 1.5px solid var(--gbc-line);
	border-radius: 12px;
	padding: 12px 10px;
	text-align: center;
	cursor: pointer;
	background: var(--gbc-card);
	font: inherit;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.gbc-tier:hover {
	border-color: #B9C7CF;
}

/* Card activa: borde 2px + fondo azul claro + sombra. En producción la de 1.5px
   casi no se distinguía de las inactivas. */
.gbc-tier.is-active {
	border-width: 2px;
	border-color: var(--gbc-navy);
	background: #F2F8FB;
	box-shadow: 0 4px 14px rgba(0, 77, 113, .12);
	padding: 11.5px 9.5px; /* Compensa el borde extra: no salta el layout. */
}

.gbc-tier-rango {
	font-size: 12.5px;
	color: var(--gbc-ink-soft);
	font-weight: 700;
}

/* El precio SIEMPRE en navy, no solo en la card activa: es el dato que el
   cliente compara entre escalas. */
.gbc-tier-precio {
	font-size: 22px;
	font-weight: 800;
	letter-spacing: -.025em;
	line-height: 1.15;
	color: var(--gbc-navy);
	font-variant-numeric: tabular-nums;
}

.gbc-tier-un {
	font-size: 11.5px;
	color: var(--gbc-ink-soft);
}

.gbc-tier-save {
	margin-top: 4px;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .01em;
	color: #0F7A88; /* Teal oscurecido: el #1AA5B5 sobre #E6F6F8 no pasa AA. */
	background: var(--gbc-teal-bg);
	border-radius: 99px;
	padding: 2px 9px;
}

/* -------------------------------------------------------------------------
   Cantidad
   ------------------------------------------------------------------------- */

.gbc-qty-row {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
}

.gbc-qty {
	display: flex;
	align-items: center;
	border: 1.5px solid var(--gbc-line);
	border-radius: 12px;
	overflow: hidden;
	background: var(--gbc-card);
	flex: none;
}

.gbc-qty-step {
	width: 44px;
	height: 46px;
	border: 0;
	background: var(--gbc-card);
	font-size: 20px;
	line-height: 1;
	color: var(--gbc-navy);
	cursor: pointer;
	font-family: inherit;
}

.gbc-qty-step:hover {
	background: var(--gbc-soft);
}

.gbc-qty-input {
	width: 86px;
	height: 46px;
	border: 0;
	border-left: 1px solid var(--gbc-line);
	border-right: 1px solid var(--gbc-line);
	text-align: center;
	font-size: 17px;
	font-weight: 700;
	font-family: inherit;
	color: var(--gbc-ink);
	outline: none;
	font-variant-numeric: tabular-nums;
}

/* Las flechitas nativas estorban a 46px de alto. */
.gbc-qty-input::-webkit-outer-spin-button,
.gbc-qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.gbc-qty-input[type="number"] {
	-moz-appearance: textfield;
	appearance: textfield;
}

.gbc-qty-hint {
	font-size: 12.5px;
	color: var(--gbc-ink-soft);
	margin: 0;
	flex: 1 1 180px;
	line-height: 1.45;
}

.gbc-qty-warn {
	margin: 12px 0 0;
	background: var(--gbc-warn-bg);
	color: var(--gbc-warn);
	border-radius: 10px;
	padding: 10px 14px;
	font-size: 12.5px;
	line-height: 1.5;
}

/* -------------------------------------------------------------------------
   Existencias por color (semáforo)
   Los tiers high/mid/low/out los decide gb_catalog_stock_label() en PHP, para
   no tener dos escalas de umbrales entre catálogo y ficha.
   ------------------------------------------------------------------------- */

.gbc-colores {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
}

.gbc-color {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: 12px;
	border: 1px solid var(--gbc-line);
	border-radius: 99px;
	padding: 6px 13px;
	color: var(--gbc-ink-soft);
	background: var(--gbc-card);
	cursor: pointer;
	font-family: inherit;
	font-weight: 500;
	transition: border-color .15s ease, color .15s ease;
}

.gbc-color:hover {
	border-color: #B9C7CF;
}

.gbc-color-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	flex: none;
	background: #C7D0D6;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
}

.gbc-color-stock {
	color: var(--gbc-ink);
	font-weight: 800;
	font-variant-numeric: tabular-nums;
}

.gbc-color.is-active {
	border-width: 2px;
	border-color: var(--gbc-navy);
	color: var(--gbc-navy);
	padding: 5px 12px; /* Compensa el borde extra. */
}

.gbc-color.is-active .gbc-color-stock {
	color: var(--gbc-navy);
}

.gbc-color.is-out {
	color: var(--gbc-bad);
	border-color: #E8D2D2;
}

.gbc-color.is-out .gbc-color-stock {
	color: var(--gbc-bad);
}

/* -------------------------------------------------------------------------
   Decorado
   ------------------------------------------------------------------------- */

.gbc-deco-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
	gap: 10px;
}

.gbc-deco {
	position: relative;
	border: 1.5px solid var(--gbc-line);
	border-radius: 12px;
	padding: 12px;
	cursor: pointer;
	background: var(--gbc-card);
	text-align: left;
	font-family: inherit;
	display: flex;
	flex-direction: column;
	gap: 2px;
	transition: border-color .15s ease, background .15s ease;
}

.gbc-deco:hover {
	border-color: #B9C7CF;
}

.gbc-deco.is-active {
	border-width: 2px;
	border-color: var(--gbc-navy);
	background: #F2F8FB;
	padding: 11px; /* Compensa el borde extra. */
}

.gbc-deco-ico {
	font-size: 20px;
	line-height: 1;
	color: var(--gbc-navy);
}

.gbc-deco-nom {
	font-weight: 700;
	font-size: 13.5px;
	letter-spacing: -.01em;
	margin-top: 5px;
	color: var(--gbc-ink);
	line-height: 1.3;
}

.gbc-deco-sub {
	font-size: 12px;
	color: var(--gbc-ink-soft);
}

/* El precio de la técnica en navy y semibold: es el dato que se compara. */
.gbc-deco-pri {
	font-size: 12.5px;
	font-weight: 700;
	color: var(--gbc-navy);
	font-variant-numeric: tabular-nums;
	margin-top: 1px;
}

.gbc-deco-chk {
	position: absolute;
	top: 9px;
	right: 10px;
	width: 17px;
	height: 17px;
	border-radius: 50%;
	border: 1.5px solid var(--gbc-line);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 10px;
	color: transparent;
	line-height: 1;
}

.gbc-deco.is-active .gbc-deco-chk {
	background: var(--gbc-navy);
	border-color: var(--gbc-navy);
	color: #fff;
}

.gbc-deco-note {
	font-size: 12px;
	color: var(--gbc-ink-soft);
	margin: 10px 0 0;
	line-height: 1.5;
}

.gbc-deco-note:empty {
	display: none;
}

/* -------------------------------------------------------------------------
   Resumen (panel navy)
   Cada renglón: precio POR PIEZA arriba, total de línea chiquito debajo.
   NO hay "unitario final" (total ÷ piezas): con mínimo de maquila ese número
   no corresponde a ninguna tarifa real. Decisión de Edgar, 2026-07-21.
   ------------------------------------------------------------------------- */

.gbc-resumen {
	background: linear-gradient(150deg, #00415F, #004D71 55%, #015E82);
	color: #fff;
	border-radius: var(--gbc-radius);
	padding: 22px;
	margin-bottom: 14px;
}

.gbc-resumen-h {
	font-size: 13.5px;
	font-weight: 800;
	letter-spacing: .07em;
	text-transform: uppercase;
	color: #9FD4E6;
	margin: 0 0 12px;
}

.gbc-rline {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 14px;
	font-size: 14px;
	padding: 9px 0;
	border-bottom: 1px dashed rgba(255, 255, 255, .18);
}

.gbc-rline[hidden] {
	display: none;
}

.gbc-rline-lbl {
	color: #C9E3EE;
	padding-top: 1px;
	line-height: 1.35;
}

.gbc-rline-val {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	text-align: right;
	gap: 1px;
	flex: none;
}

.gbc-rline-val strong {
	font-weight: 800;
	font-size: 15.5px;
	letter-spacing: -.015em;
	color: #fff;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

/* Con mínimo de maquila el texto es largo y no es una cifra unitaria: baja de
   tamaño para no competir con el total. */
.gbc-rline-val strong.is-minimo {
	font-size: 13.5px;
	font-weight: 600;
}

.gbc-rline-val small {
	font-size: 11.5px;
	color: #9FC4D4;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.gbc-rtotal {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	margin-top: 14px;
}

.gbc-rtotal-lbl {
	font-size: 13px;
	color: #C9E3EE;
}

.gbc-rtotal-amt {
	font-size: 30px;
	font-weight: 800;
	letter-spacing: -.02em;
	font-variant-numeric: tabular-nums;
}

.gbc-riva {
	font-size: 11.5px;
	color: #9FC4D4;
	text-align: right;
	margin: 2px 0 0;
}

.gbc-trust {
	display: flex;
	gap: 14px;
	flex-wrap: wrap;
	margin-top: 14px;
	font-size: 11.5px;
	color: #AFCFDD;
}

/* -------------------------------------------------------------------------
   Botones
   ------------------------------------------------------------------------- */

.gbc-btns {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin-top: 16px;
}

.gbc-btn {
	border: 0;
	border-radius: 12px;
	padding: 14px 16px;
	font-weight: 800;
	font-size: 14.5px;
	letter-spacing: -.01em;
	cursor: pointer;
	font-family: inherit;
	text-align: center;
	text-decoration: none;
	display: block;
	transition: transform .1s ease, filter .15s ease;
}

.gbc-btn:active {
	transform: scale(.98);
}

.gbc-btn--teal {
	background: var(--gbc-teal);
	color: #fff;
}

.gbc-btn--teal:hover {
	filter: brightness(1.07);
	color: #fff;
}

.gbc-btn--wa {
	background: #fff;
	color: var(--gbc-navy);
}

.gbc-btn--wa:hover {
	filter: brightness(.96);
	color: var(--gbc-navy);
}

/* Variante "Cotizar con asesor": el widget no tiene panel navy detrás, así que
   el botón blanco necesita borde para no desaparecer sobre el fondo claro. */
.gbc-widget--asesor {
	background: var(--gbc-card);
	border: 1px solid var(--gbc-line);
	border-radius: var(--gbc-radius);
	padding: 20px 22px;
	text-align: center;
}

.gbc-widget--asesor .gbc-btn--wa {
	border: 1.5px solid var(--gbc-line);
	color: var(--gbc-navy);
}

.gbc-asesor-nota {
	margin: 0;
	font-size: 14px;
	color: var(--gbc-ink-soft);
}

/* -------------------------------------------------------------------------
   Teaser cuentas corporativas + cláusulas
   ------------------------------------------------------------------------- */

.gbc-b2b {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
	background: var(--gbc-teal-bg);
	border: 1px dashed var(--gbc-teal);
	border-radius: var(--gbc-radius);
	padding: 14px 18px;
	font-size: 13px;
	margin-bottom: 14px;
}

.gbc-b2b-ico {
	font-size: 18px;
	line-height: 1;
}

.gbc-b2b-txt {
	margin: 0;
	flex: 1 1 200px;
	color: var(--gbc-ink-soft);
	line-height: 1.5;
}

.gbc-b2b-txt b {
	color: var(--gbc-navy);
	font-weight: 800;
}

.gbc-b2b-cta {
	color: #0F7A88;
	font-weight: 800;
	text-decoration: none;
	white-space: nowrap;
	margin-left: auto;
}

.gbc-b2b-cta:hover {
	text-decoration: underline;
	color: #0F7A88;
}

.gbc-clausulas {
	font-size: 12px;
	color: var(--gbc-ink-soft);
	line-height: 1.6;
}

.gbc-clausulas h3 {
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .07em;
	text-transform: uppercase;
	color: var(--gbc-ink);
	margin: 0 0 8px;
}

.gbc-clausulas p {
	margin: 0 0 4px;
}

/* -------------------------------------------------------------------------
   Modal "Mi cotización"
   Mismo contrato que .lp-modal de las landings: hidden + .is-open en dos
   frames. El [hidden]{display:none} explícito es OBLIGATORIO porque
   display:flex le gana al atributo hidden nativo.
   ------------------------------------------------------------------------- */

.gbc-modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	opacity: 0;
	pointer-events: none;
	transition: opacity .2s ease;
}

.gbc-modal.is-open {
	opacity: 1;
	pointer-events: auto;
}

.gbc-modal[hidden] {
	display: none;
}

.gbc-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 32, 48, .55);
}

.gbc-modal__inner {
	position: relative;
	width: 100%;
	max-width: 560px;
	max-height: 86vh;
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 16px;
	overflow: hidden;
	transform: translateY(16px);
	transition: transform .25s ease;
	box-shadow: 0 24px 60px rgba(0, 32, 48, .3);
}

.gbc-modal.is-open .gbc-modal__inner {
	transform: translateY(0);
}

.gbc-modal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 22px;
	background: var(--gbc-navy);
	color: #fff;
}

.gbc-modal__title {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	color: #fff;
}

.gbc-modal__close {
	border: 0;
	background: transparent;
	color: #fff;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	padding: 0 4px;
	opacity: .8;
}

.gbc-modal__close:hover {
	opacity: 1;
}

.gbc-modal__body {
	flex: 1;
	overflow-y: auto;
	padding: 8px 22px;
}

.gbc-modal__empty {
	padding: 32px 0;
	text-align: center;
	color: #8A959B;
	font-size: 14px;
}

.gbc-modal__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.gbc-modal__item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 14px 0;
	border-bottom: 1px solid #F0F0EB;
}

.gbc-modal__item:last-child {
	border-bottom: 0;
}

.gbc-modal__item-body {
	flex: 1;
	min-width: 0;
}

.gbc-modal__item-name {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: var(--gbc-navy);
}

.gbc-modal__item-meta {
	display: block;
	font-size: 12.5px;
	color: #8A959B;
	margin-top: 2px;
}

/* Mismo formato que el resumen del widget: unitario grande, desglose gris. */

.gbc-modal__item-cifra {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	text-align: right;
	gap: 1px;
	flex-shrink: 0;
}

.gbc-modal__item-unit {
	font-size: 16px;
	font-weight: 700;
	color: var(--gbc-navy);
	line-height: 1.25;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.gbc-modal__item-desglose {
	font-size: 11.5px;
	color: #8A959B;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.gbc-modal__item-sub {
	font-size: 14px;
	font-weight: 700;
	color: var(--gbc-navy);
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

/* Línea sin precio (producto sin _gb_costo_real): jamás se muestra $0.00. */
.gbc-modal__item-sub.is-quote {
	font-size: 12px;
	font-weight: 600;
	color: #8A959B;
}

.gbc-modal__item-remove {
	display: inline-block;
	margin-top: 4px;
	border: 0;
	background: transparent;
	color: #B4471F;
	font-size: 12px;
	cursor: pointer;
	padding: 2px 0;
	text-decoration: underline;
	font-family: inherit;
}

.gbc-modal__foot {
	padding: 18px 22px 22px;
	border-top: 1px solid #E5E5E0;
	background: #FCFCFA;
}

.gbc-modal__total {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	font-size: 15px;
	color: #5E6B73;
}

.gbc-modal__total strong {
	font-size: 24px;
	color: var(--gbc-navy);
	font-variant-numeric: tabular-nums;
}

/* Avisa que el total no incluye las partidas sin precio. */
.gbc-modal__total.has-pendientes::after {
	content: '+ partidas por cotizar';
	font-size: 11px;
	color: #8A959B;
}

.gbc-modal__nota {
	margin: 6px 0 14px;
	font-size: 12px;
	color: #8A959B;
}

.gbc-modal__cta {
	display: block;
	width: 100%;
	padding: 14px 18px;
	border-radius: 10px;
	background: var(--gbc-teal);
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	text-align: center;
	text-decoration: none;
	transition: filter .15s ease;
}

.gbc-modal__cta:hover {
	filter: brightness(1.08);
	color: #fff;
}

/* -------------------------------------------------------------------------
   Accesibilidad y responsive
   ------------------------------------------------------------------------- */

.gbc-tier:focus-visible,
.gbc-deco:focus-visible,
.gbc-color:focus-visible,
.gbc-qty-step:focus-visible,
.gbc-btn:focus-visible,
.gbc-b2b-cta:focus-visible,
.gbc-modal__cta:focus-visible,
.gbc-modal__item-remove:focus-visible {
	outline: 2px solid var(--gbc-teal);
	outline-offset: 2px;
}

.gbc-qty-input:focus-visible {
	outline: 2px solid var(--gbc-navy);
	outline-offset: -2px;
}

@media (max-width: 600px) {
	.gbc-modal {
		padding: 0;
		align-items: flex-end;
	}

	.gbc-modal__inner {
		max-width: 100%;
		max-height: 92vh;
		border-radius: 16px 16px 0 0;
	}

	.gbc-panel {
		padding: 16px 15px;
	}

	.gbc-resumen {
		padding: 18px 16px;
	}

	.gbc-btns {
		grid-template-columns: 1fr;
	}

	.gbc-rtotal-amt {
		font-size: 26px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.gbc-modal,
	.gbc-modal__inner,
	.gbc-tier,
	.gbc-deco,
	.gbc-color,
	.gbc-btn,
	.gbc-modal__cta {
		transition: none;
	}

	.gbc-btn:active {
		transform: none;
	}
}
