/* Product spec tables — metal-finish availability matrix on /product/<slug>/.
 *
 * Scoped to `.wp-block-post-content table` so it picks up both:
 *   - imported plain <table> markup inside post_content
 *   - native wp:table blocks (when products are re-authored in the editor)
 *
 * The matrix has Code | Size | <metal columns> with `•` markers for
 * available finishes; this stylesheet aligns the SKU/Size columns left
 * and centers the metal columns, with subtle striping.
 */

.wp-block-post-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 1.5rem 0;
	font-size: 0.875rem;
	line-height: 1.4;
}

.wp-block-post-content thead th {
	background: var(--wp--preset--color--subtle);
	color: var(--wp--preset--color--ink);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-size: 0.7rem;
	padding: 0.5rem 0.4rem;
	text-align: center;
	border-bottom: 2px solid var(--wp--preset--color--ink);
	white-space: nowrap;
}

.wp-block-post-content thead th:first-child,
.wp-block-post-content thead th:nth-child(2) {
	text-align: left;
}

.wp-block-post-content tbody td {
	padding: 0.5rem 0.4rem;
	text-align: center;
	vertical-align: middle;
	border-bottom: 1px solid #e5e7eb;
	color: var(--wp--preset--color--primary);
	font-weight: 700;
	font-size: 1rem;
	line-height: 1;
}

.wp-block-post-content tbody td:first-child {
	color: var(--wp--preset--color--ink);
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-weight: 400;
	font-size: 0.8125rem;
	text-align: left;
	white-space: nowrap;
}

.wp-block-post-content tbody td:nth-child(2) {
	color: var(--wp--preset--color--ink);
	font-weight: 400;
	text-align: left;
}

.wp-block-post-content tbody tr:nth-child(odd) {
	background: #fafafa;
}

.wp-block-post-content tbody tr:hover {
	background: #f0f9fc;
}

/* Mobile: horizontal scroll so the wide matrix doesn't break layout. */
@media (max-width: 720px) {
	.wp-block-post-content figure.wp-block-table,
	.wp-block-post-content {
		max-width: 100%;
	}

	.wp-block-post-content table {
		display: block;
		overflow-x: auto;
		white-space: nowrap;
		-webkit-overflow-scrolling: touch;
	}
}
