/* CBF — Guía de tallas HTML dinámica. Estética basada en las guías históricas en imagen. */
.cbf-size-guide-inline {
	display: none !important;
}

.cbf-size-guide-inline.fancybox__content,
.fancybox__content > .cbf-size-guide-inline,
.fancybox__content .cbf-size-guide-inline {
	display: block !important;
}

.cbf-size-guide {
	box-sizing: border-box;
	width: min(980px, calc(100vw - 48px));
	max-width: 100%;
	padding: 26px;
	background: #fff;
	color: #111;
}

.cbf-size-guide__table-wrap {
	width: 100%;
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.cbf-size-guide__table {
	width: 100%;
	min-width: 620px;
	margin: 0;
	border-collapse: collapse;
	border-spacing: 0;
	font-variant-numeric: tabular-nums;
	font-size: clamp(1rem, 1.8vw, 1.35rem);
	line-height: 1.25;
	background: #fff;
}

.cbf-size-guide__table th,
.cbf-size-guide__table td {
	box-sizing: border-box;
	padding: 18px 20px;
	border: 1.5px solid #303030;
	text-align: center;
	vertical-align: middle;
	background: #fff;
	color: #111;
}

.cbf-size-guide__table thead th {
	padding-top: 22px;
	padding-bottom: 22px;
	background: #087a7a;
	color: #fff;
	font-weight: 700;
	font-size: 1.08em;
}

.cbf-size-guide__table tbody th {
	font-weight: 700;
	font-size: 1.08em;
}

@media (max-width: 700px) {
	/* Fancybox: fija el ancho del propio popup dejando margen simétrico. */
	.cbf-size-guide-inline.fancybox__content,
	.fancybox__content > .cbf-size-guide-inline {
		box-sizing: border-box;
		width: calc(100vw - 32px) !important;
		max-width: calc(100vw - 32px) !important;
		padding: 0 !important;
		overflow: hidden;
	}

	/* El contenido ya no se calcula contra el viewport, sino contra el popup. */
	.cbf-size-guide {
		box-sizing: border-box;
		width: 100%;
		max-width: 100%;
		padding: 16px;
	}

	.cbf-size-guide__table-wrap {
		box-sizing: border-box;
		width: 100%;
		max-width: 100%;
		overflow: hidden;
	}

	.cbf-size-guide__table {
		box-sizing: border-box;
		width: 100%;
		max-width: 100%;
		min-width: 0;
		table-layout: fixed;
		font-size: clamp(0.76rem, 3.3vw, 0.92rem);
	}

	.cbf-size-guide__table th,
	.cbf-size-guide__table td {
		padding: 11px 4px;
		white-space: normal;
		word-break: normal;
		overflow-wrap: normal;
	}

	.cbf-size-guide__table th:first-child,
	.cbf-size-guide__table td:first-child {
		width: 24%;
	}

	.cbf-size-guide__table th:nth-child(2),
	.cbf-size-guide__table td:nth-child(2),
	.cbf-size-guide__table th:nth-child(3),
	.cbf-size-guide__table td:nth-child(3) {
		width: 38%;
	}

	.cbf-size-guide__table thead th {
		padding-top: 14px;
		padding-bottom: 14px;
		font-size: 0.95em;
		line-height: 1.15;
	}

	.cbf-size-guide__table tbody th {
		font-size: 1em;
	}
}

@media (max-width: 380px) {
	.cbf-size-guide-inline.fancybox__content,
	.fancybox__content > .cbf-size-guide-inline {
		width: calc(100vw - 20px) !important;
		max-width: calc(100vw - 20px) !important;
	}

	.cbf-size-guide {
		padding: 12px;
	}

	.cbf-size-guide__table {
		font-size: 0.74rem;
	}

	.cbf-size-guide__table th,
	.cbf-size-guide__table td {
		padding: 10px 3px;
	}
}
