/* === 4S Tallas: botón en la ficha de producto === */
.t4s-tallas-btn {
	display: inline-block;
	margin: 12px 0;
	padding: 8px 18px;
	background: #222222; /* Se mantiene tu color oscuro */
	color: #ffffff;      /* Se mantiene tu texto blanco */
	border: 1px solid #222222;
	border-radius: 4px;
	font-size: 14px;
	line-height: 1.4;
	cursor: pointer;
	text-decoration: none;
	transition: background-color 0.2s ease;
}

.t4s-tallas-btn:hover,
.t4s-tallas-btn:focus {
	background: #444444;
	color: #ffffff;
}

/* === 4S Tallas: ventana emergente (modal) === */
.t4s-modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 100000;
}

.t4s-modal.t4s-active {
	display: block;
}

.t4s-modal-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.6);
}

.t4s-modal-content {
	position: relative;
	box-sizing: border-box;
	max-width: 820px;
	width: 92%;
	margin: 4% auto;
	background: #ffffff;
	padding: 30px;
	border-radius: 6px;
	max-height: 86vh;
	overflow-y: auto;
}

.t4s-modal-close {
	position: absolute;
	top: 8px;
	right: 14px;
	font-size: 28px;
	line-height: 1;
	background: none;
	border: none;
	cursor: pointer;
	color: #333333;
}

.t4s-modal-content h2 {
	margin-top: 0;
}

/* === 4S Tallas: tabla + imágenes en dos columnas === */
.t4s-table-wrap {
	display: flex;
	gap: 30px;
	flex-wrap: wrap;
	margin-top: 15px;
}

.t4s-table-col {
	flex: 1 1 320px;
	width: 100%; /* Asegura que la columna use todo el espacio disponible */
}

.t4s-table-col table {
	width: 100%;
	border-collapse: collapse;
}

.t4s-table-col table th,
.t4s-table-col table td {
	border: 1px solid #dddddd;
	padding: 6px 10px;
	text-align: center;
}

.t4s-images-col {
	flex: 0 1 280px;
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.t4s-images-col img {
	max-width: 100%;
	height: auto;
	border-radius: 4px;
}

/* === 4S Tallas: página central [4s_tallas] === */
.t4s-central .t4s-index {
	margin: 0 0 30px;
	padding-left: 18px;
}

.t4s-central .t4s-index li {
	margin-bottom: 6px;
}

.t4s-central .t4s-section {
	margin-bottom: 40px;
}

/* === Ajustes específicos para móviles (Mejorado) === */
@media (max-width: 600px) {
	.t4s-table-wrap {
		flex-direction: column;
		gap: 20px;
	}

	/* Evita que las tablas grandes rompan la ventana emergente forzando scroll táctil */
	.t4s-table-col {
		width: 100%;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch; /* Scroll ultra-suave en teléfonos iOS y Android */
		margin-bottom: 10px;
	}

	/* Evitamos saltos de línea molestos en textos cortos dentro de la tabla */
	.t4s-table-col table th,
	.t4s-table-col table td {
		padding: 8px 6px;
		font-size: 13px;
		white-space: nowrap; 
	}

	/* Optimizamos los márgenes de la ventana en pantallas muy estrechas */
	.t4s-modal-content {
		padding: 20px 15px;
		margin: 10% auto;
		width: 95%;
	}

	.t4s-images-col {
		flex: 1 1 auto;
		width: 100%;
	}
}