/* 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-weight: 400;
	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;
	}
}

/* "Shop Now AU / NZ" buttons — overall footprint reduced ~one third from the
 * global button size set in theme.json (1rem font, 13px/29px padding). Scaling
 * each side by ~0.82 cuts the area ~⅓ (font 0.8125rem ≈ 13px, padding 11px/24px)
 * — a clear trim that stays readable, rather than ⅓ off each side (which would
 * drop the area ~55% and look tiny).
 *
 * This stylesheet is enqueued only on single product pages, and these are the
 * only buttons on that template, so the global button style stays untouched
 * everywhere else (category CTAs, contact card, etc.). */
.wp-block-buttons .wp-block-button__link {
	font-size: 0.8125rem;
	padding: 11px 24px;
}
