/* Tablas Responsivas — estilos públicos */

.wptr {
	--wptr-accent: #c8102e;
	--wptr-text: #6b6b6b;        /* texto normal */
	--wptr-head: #6b6b6b;        /* encabezado */
	--wptr-available: #111111;   /* disponibilidad > 0 */
	--wptr-soldout: #bdbdbd;     /* disponibilidad = 0 */
	--wptr-border: #e7e7e7;
	--wptr-bg: #ffffff;
	margin: 0 0 2em;
	font-size: 15px;
	line-height: 1.35;
}

.wptr .wptr-title {
	color: var(--wptr-accent);
	text-transform: uppercase;
	font-size: 1.35em;
	font-weight: 500;
	letter-spacing: .01em;
	margin: 0 0 .9em;
}

.wptr .wptr-scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	position: relative;
}
.wptr .wptr-scroll:focus { outline: none; }
.wptr .wptr-scroll:focus-visible { outline: 2px solid var(--wptr-accent); outline-offset: 2px; }

/* Reinicio para evitar estilos del tema */
.wptr .wptr-table {
	width: 100%;
	min-width: 720px;
	margin: 0;
	border: 0;
	border-collapse: separate;
	border-spacing: 0;
	background: var(--wptr-bg);
	table-layout: auto;
}
.wptr .wptr-table th,
.wptr .wptr-table td {
	border: 0;
	border-bottom: 1px solid var(--wptr-border);
	padding: .95em .6em;
	vertical-align: middle;
	background: var(--wptr-bg);
	color: var(--wptr-text);
	font-weight: 400;
	font-size: 1em;
	line-height: 1.3;
}
.wptr .wptr-table thead th {
	color: var(--wptr-head);
	font-size: .93em;
	padding-top: .6em;
	padding-bottom: .9em;
}

/* Alineación por columna */
.wptr .wptr-table .wptr-al-left { text-align: left; }
.wptr .wptr-table .wptr-al-center { text-align: center; }
.wptr .wptr-table .wptr-al-right { text-align: right; }

/* Enlaces */
.wptr .wptr-link {
	color: var(--wptr-accent);
	text-decoration: none;
	box-shadow: none;
}
.wptr .wptr-link:hover,
.wptr .wptr-link:focus { text-decoration: underline; }

/* Disponibilidad: 0 → gris claro, > 0 → negro */
.wptr .wptr-table tr.wptr-row--agotada > th,
.wptr .wptr-table tr.wptr-row--agotada > td { color: var(--wptr-soldout); }
.wptr .wptr-table tr.wptr-row--disponible > th,
.wptr .wptr-table tr.wptr-row--disponible > td { color: var(--wptr-available); }

/* Texto solo para lectores de pantalla */
.wptr .wptr-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/* Tablet y móvil: scroll horizontal, primera columna y encabezado fijos */
@media (max-width: 782px) {
	.wptr { font-size: 14px; }
	.wptr .wptr-scroll {
		overflow: auto;
		max-height: 75vh;
		border-top: 1px solid var(--wptr-border);
	}
	.wptr .wptr-table thead th {
		position: sticky;
		top: 0;
		z-index: 2;
	}
	.wptr .wptr-sticky-first th:first-child,
	.wptr .wptr-sticky-first td:first-child {
		position: sticky;
		left: 0;
		z-index: 1;
		box-shadow: 6px 0 6px -6px rgba(0, 0, 0, .18);
	}
	.wptr .wptr-sticky-first thead th:first-child { z-index: 3; }
	.wptr .wptr-table th,
	.wptr .wptr-table td { padding: .8em .55em; }
}

/* Impresión */
@media print {
	.wptr .wptr-scroll { overflow: visible; max-height: none; }
	.wptr .wptr-table { min-width: 0; }
	.wptr .wptr-table th,
	.wptr .wptr-table td { position: static !important; box-shadow: none !important; }
	.wptr .wptr-link::after { content: " (" attr(href) ")"; font-size: .8em; color: #666; }
}
