#emxpr-popup {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: #fff;
	padding: 20px;
	box-shadow: 0 0 10px rgba(0,0,0,0.1);
	z-index: 10000;
   min-width: 350px;
   max-width: 500px;
   background-color: lightgray;
   border: 1px solid #adadad;
   box-shadow: 0 0 25px rgb(0 0 0 / 70%);
   border-radius: 10px;
}

#emxpr-popup form {
	display: flex;
	flex-direction: column;
   margin-bottom: initial;
}

#emxpr-popup form .quantity {
	display: flex;
	align-items: center;
}

#emxpr-popup form .quantity button {
	width: 30px;
	height: 39px;
   padding: 0px;
   min-height: initial;
   top: 0px;
   line-height: normal;
   margin: 0px;
   margin-bottom: 10px;
   background-color: #6f6e6e45;
}

#emxpr-popup form button.emxpr-qty-minus  {
   margin-left: 50px;
}

#emxpr-popup input#emxpr-quantity {
   margin-bottom: 10px;
}

#emxpr-popup label#lblcaracteristicas {
   margin-top: 5px;
}

#emxpr-popup form button#btncerrar {
   width: 100%;
   margin-bottom: auto;
   border-radius: 5px;
}

#emxpr-popup .price-wrapper {
   font-size: 2em;
   text-align: center;
   margin: 20px;
   height: 50px;
}

#emxpr-popup .price-wrapper span {
   color: #111;
    font-weight: 700;
    white-space: nowrap;
}

#emxpr-popup .price-wrapper sup.euro {
   font-size: 0.7em;
   font-weight: bold;
}

#emxpr-popup .price-wrapper small.sufijo {
   font-size: 60%;
}

#emxpr-popup .price-wrapper small.avisoUnitario {
   font-size: 40%;
}

#emx-p-precio {
   line-height: 0.5;
}

button#emxpr-button {
   float: right;
   top: -45px;
   margin: 0px;
   padding: 0px;
   line-height: normal;
   min-height: auto;
   padding: 10px;
   background-color: #6f6e6e4f;
}

/* Spinner de carga */
#emxpr-loading {
	display: inline-block;
	width: 1em;
	height: 1em;
	border: 2px solid rgba(0, 0, 0, 0.1);
	border-top-color: #000;
	border-radius: 50%;
	animation: spin 1s linear infinite;
   display: none;
}

#emxpr-loading-space {
   min-height: 1em;
   min-width: 1em;
}

button#emxpr-consultar {
   border-radius: 5px;
}

.emxpr-row {
   display: flex;
   justify-content: space-between;
}

.emxpr-cifcliente {
   width: 100%;
   margin-right: 10px;
}

.emxpr-tarifas {
   width: 100%;
   margin-right: 10px;
}

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

/* Estilos para popup de escalado de descuentos - Siguiendo el patrón del popup original */
#emxpr-escalado-popup {
	position: fixed !important;
	top: 50% !important;
	left: 50% !important;
	transform: translate(-50%, -50%) !important;
	background: lightgray !important;
	padding: 20px !important;
	box-shadow: 0 0 25px rgb(0 0 0 / 70%) !important;
	z-index: 10000 !important;
	min-width: 400px;
	max-width: 600px;
	max-height: 80vh;
	overflow-y: auto;
	border: 1px solid #adadad !important;
	border-radius: 10px !important;
}

.emxpr-escalado-header {
	margin-bottom: 15px;
	padding-bottom: 10px;
	border-bottom: 1px solid #ddd;
	overflow: hidden; /* Para el float del botón cerrar */
   display: flex;
}

.emxpr-escalado-header h3 {
	margin: 0 !important;
	color: #333 !important;
	font-size: 1.2em !important;
	float: left;
}

#emxpr-escalado-close {
	float: right !important;
	font-size: 28px !important;
	font-weight: bold !important;
	color: #999 !important;
	cursor: pointer !important;
	line-height: 1 !important;
	background: none !important;
	border: none !important;
	padding: 0 !important;
}

#emxpr-escalado-close:hover {
	color: #333 !important;
}

#emxpr-escalado-tabla-container {
	margin-top: 15px;
	clear: both; /* Limpiar floats del header */
}

/* Estilos para tablas de escalado responsivas */
#emxpr-escalado-tabla-container table {
	width: 100% !important;
	border-collapse: collapse !important;
	font-size: 14px !important;
	margin-bottom: 15px;
}

#emxpr-escalado-tabla-container th,
#emxpr-escalado-tabla-container td {
	padding: 8px !important;
	border: 1px solid #ddd !important;
	text-align: left !important;
}

#emxpr-escalado-tabla-container th {
	background-color: #f5f5f5 !important;
	font-weight: bold !important;
}

#emxpr-escalado-tabla-container h4 {
	margin: 15px 0 10px 0 !important;
	color: #333 !important;
	font-size: 1.1em !important;
}

/* Responsive para móviles */
@media (max-width: 480px) {
	.emxpr-escalado-content {
		min-width: 280px;
		margin: 10px;
		padding: 15px;
	}
	
	#emxpr-escalado-tabla-container table {
		font-size: 12px !important;
	}
	
	#emxpr-escalado-tabla-container th,
	#emxpr-escalado-tabla-container td {
		padding: 6px !important;
	}
}


/* =================================================================
   ESTILOS PARA POPUP DE LISTA DE ARTÍCULOS CON ESCALADO
   ================================================================= */

/* Contenedor del botón flotante */
#emxpr-btn-lista-escalado-container {
	position: fixed;
	top: 170px;
	right: 20px;
	z-index: 9999;
}

/* Botón flotante */
#emxpr-btn-lista-escalado {
	background-color: #dd3333;
	color: white;
	padding: 12px 16px;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	font-size: 18px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
	transition: all 0.3s ease;
	width: 60px;
	height: 60px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	gap: 2px;
}

#emxpr-btn-lista-escalado:hover {
	background-color: #c12929;
	transform: scale(1.1);
	box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

#emxpr-btn-lista-escalado i {
	margin: 0;
	padding: 0;
	line-height: 1;
}

#emxpr-btn-lista-escalado i.fa-list {
	font-size: 16px;
}

#emxpr-btn-lista-escalado i.fa-percent {
	font-size: 12px;
}

/* Popup principal */
#emxpr-lista-escalado-popup {
	position: fixed !important;
	top: 50% !important;
	left: 50% !important;
	transform: translate(-50%, -50%) !important;
	background: lightgray !important;
	padding: 20px !important;
	box-shadow: 0 0 25px rgb(0 0 0 / 70%) !important;
	z-index: 10000 !important;
	min-width: 700px;
	max-width: 90%;
	max-height: 90vh;
	border: 1px solid #adadad !important;
	border-radius: 10px !important;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

/* Header del popup */
.emxpr-lista-escalado-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 15px;
	padding-bottom: 10px;
	border-bottom: 2px solid #999;
}

.emxpr-lista-escalado-header h3 {
	margin: 0;
	font-size: 1.2em;
	color: #333;
}

#emxpr-lista-escalado-close {
	font-size: 28px;
	font-weight: bold;
	color: #666;
	cursor: pointer;
	line-height: 1;
	transition: color 0.3s ease;
}

#emxpr-lista-escalado-close:hover {
	color: #000;
}

/* Contenido del popup */
#emxpr-lista-escalado-contenido {
	flex: 1;
	overflow: auto;
	margin-bottom: 15px;
   padding-right: 15px;
}

/* Spinner de carga */
.emxpr-loading-container {
	text-align: center;
	padding: 40px 20px;
}

.emxpr-loading-container i {
	color: #dd3333;
	margin-bottom: 15px;
}

.emxpr-loading-container p {
	font-size: 1.1em;
	color: #666;
	margin: 0;
}

/* Mensaje de error */
.emxpr-error-message {
	background-color: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
	border-radius: 5px;
	padding: 15px;
	margin: 20px 0;
	text-align: center;
	font-size: 1.1em;
}

/* Contador de artículos */
.emxpr-contador {
	font-size: 0.95em;
	color: #666;
	margin-bottom: 10px;
	font-weight: bold;
	text-align: right;
}

/* Tabla de artículos */
#emxpr-lista-escalado-tabla {
	width: 100%;
	border-collapse: collapse;
	background: white;
	border-radius: 5px;
	overflow: hidden;
	border: 1px solid #d0d0d0;
}

#emxpr-lista-escalado-tabla thead {
	background-color: #e8e8e8;
	color: #4a4a4a;
}

#emxpr-lista-escalado-tabla thead th {
	padding: 12px 10px;
	text-align: left;
	font-weight: 600;
	font-size: 0.85em;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	border-bottom: 1px solid #d0d0d0;
}

#emxpr-lista-escalado-tabla tbody tr {
	border-bottom: 1px solid #e8e8e8;
	transition: background-color 0.2s ease;
}

#emxpr-lista-escalado-tabla tbody tr:hover {
	background-color: #f9f9f9;
}

#emxpr-lista-escalado-tabla tbody tr:nth-child(even) {
	background-color: #f5f5f5;
}

#emxpr-lista-escalado-tabla tbody tr:nth-child(even):hover {
	background-color: #efefef;
}

#emxpr-lista-escalado-tabla tbody tr:last-child {
	border-bottom: none;
}

#emxpr-lista-escalado-tabla tbody td {
	padding: 12px 10px;
	font-size: 0.9em;
	color: #333;
}

#emxpr-lista-escalado-tabla tbody td.emxpr-ref {
	font-weight: 600;
	color: #333;
}

#emxpr-lista-escalado-tabla tbody td.emxpr-nombre {
	color: #333;
}

#emxpr-lista-escalado-tabla tbody td.emxpr-familia {
	color: #666;
	font-size: 0.85em;
}

#emxpr-lista-escalado-tabla tbody td.emxpr-tramos {
	text-align: center;
	font-weight: 600;
	color: #333;
}

#emxpr-lista-escalado-tabla tbody td.emxpr-ver {
	text-align: center;
}

#emxpr-lista-escalado-tabla tbody td.emxpr-ver a {
	color: #dd3333;
	font-size: 1.2em;
	transition: color 0.3s ease, transform 0.3s ease;
	display: inline-block;
}

#emxpr-lista-escalado-tabla tbody td.emxpr-ver a:hover {
	color: #c12929;
	transform: scale(1.2);
}

/* Botón cerrar */
.emxpr-btn-cerrar {
	width: 100%;
	padding: 14px;
	background-color: #dd3333;
	color: white;
	border: none;
	border-radius: 3px;
	cursor: pointer;
	font-size: 1em;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	transition: background-color 0.3s ease;
}

.emxpr-btn-cerrar:hover {
	background-color: #c12929;
}

/* Responsive - Tablets y móviles */
@media (max-width: 768px) {
	#emxpr-btn-lista-escalado-container {
		top: 120px;
		right: 10px;
	}
	
	#emxpr-btn-lista-escalado {
		width: 50px;
		height: 50px;
		padding: 10px;
	}
	
	#emxpr-lista-escalado-popup {
		min-width: 95%;
		max-width: 95%;
		padding: 15px !important;
	}
	
	#emxpr-lista-escalado-tabla {
		font-size: 0.8em;
	}
	
	#emxpr-lista-escalado-tabla thead th,
	#emxpr-lista-escalado-tabla tbody td {
		padding: 8px 5px;
	}
	
	.emxpr-lista-escalado-header h3 {
		font-size: 1.1em;
	}
}


/* =================================================================
   ESTILOS PARA POPUP "SOLO BAJO PEDIDO" (emxsbp)
   ================================================================= */

/* Overlay semitransparente */
#emxsbp-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	z-index: 9999;
}

/* Popup principal */
#emxsbp-popup {
	position: fixed !important;
	top: 50% !important;
	left: 50% !important;
	transform: translate(-50%, -50%) !important;
	background: lightgray !important;
	padding: 20px !important;
	box-shadow: 0 0 25px rgb(0 0 0 / 70%) !important;
	z-index: 10000 !important;
	min-width: 420px;
	max-width: 520px;
	border: 1px solid #adadad !important;
	border-radius: 10px !important;
}

/* Header del popup */
.emxsbp-popup-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 15px;
	padding-bottom: 10px;
	border-bottom: 1px solid #ddd;
}

.emxsbp-popup-header h3 {
	margin: 0 !important;
	color: #333 !important;
	font-size: 1.1em !important;
	padding-right: 15px;
}

#emxsbp-close {
	font-size: 28px !important;
	font-weight: bold !important;
	color: #999 !important;
	cursor: pointer !important;
	line-height: 1 !important;
	background: none !important;
	border: none !important;
	padding: 0 !important;
}

#emxsbp-close:hover {
	color: #333 !important;
}

/* Formulario */
#emxsbp-form {
	display: flex;
	flex-direction: column;
	margin-bottom: 0;
}

#emxsbp-form label {
	margin-top: 10px;
	margin-bottom: 4px;
	font-weight: 600;
	font-size: 0.95em;
	color: #333;
}

#emxsbp-form input[type="text"],
#emxsbp-form input[type="email"] {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 0.95em;
	box-sizing: border-box;
	margin-bottom: 5px;
}

#emxsbp-submit {
	margin-top: 15px;
	width: 100%;
	border-radius: 5px !important;
	background-color: #dd3333 !important;
	color: #fff !important;
	border-color: #dd3333 !important;
}

#emxsbp-submit:hover {
	background-color: #c12929 !important;
	border-color: #c12929 !important;
}

/* Botón de la ficha de producto */
.emxsbp-btn-container {
	margin-top: 15px;
}

#emxsbp-btn-interes {
	font-size: .8em;
}

/* Zona de feedback */
#emxsbp-feedback {
	margin-top: 10px;
	padding: 12px 15px;
	border-radius: 5px;
	font-size: 0.95em;
	line-height: 1.4;
}

.emxsbp-feedback-success {
	background-color: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
}

.emxsbp-feedback-error {
	background-color: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
}

/* Responsive para móviles */
@media (max-width: 480px) {
	#emxsbp-popup {
		min-width: 90% !important;
		max-width: 95% !important;
		padding: 15px !important;
	}
}