/**
 * single-product.css
 *
 * Ported directly from the approved review mockup. Covers gallery,
 * color swatches, pricing matrix, CTA row, modals (Show All Colors,
 * Size Chart), and the description/spec section.
 */

.product-layout {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 40px;
	padding: 22px 0 50px;
	align-items: start;
}

/* ---------------- Gallery ---------------- */
.gallery {
	display: grid;
	grid-template-columns: 76px 1fr;
	gap: 12px;
}
.thumb-strip {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.thumb-strip button {
	border: 1px solid #ddd;
	background: #f2f2f2;
	aspect-ratio: 1 / 1;
	padding: 0;
	overflow: hidden;
}
.thumb-strip button.active {
	border-color: #111;
	border-width: 2px;
}
.thumb-strip img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.main-image-wrap {
	position: relative;
	border: 1px solid #ddd;
	aspect-ratio: 1 / 1;
	overflow: hidden;
}
.main-image-wrap img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.gallery-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(255, 255, 255, 0.9);
	border: 1px solid #111;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	font-size: 15px;
	z-index: 5;
	cursor: pointer;
}
.gallery-arrow.prev {
	left: 12px;
}
.gallery-arrow.next {
	right: 12px;
}
.color-disclaimer {
	font-size: 11px;
	color: #999;
	margin-top: 10px;
}

/* ---------------- Product summary ---------------- */
.brand-link {
	text-transform: uppercase;
	font-size: 12px;
	letter-spacing: 0.05em;
	color: #666;
}
.product-title {
	font-size: 24px;
	margin: 0.2em 0 0.3em;
}
.sku-line {
	font-size: 12.5px;
	color: #888;
	margin-bottom: 14px;
}
.price-lead {
	font-size: 20px;
	font-weight: 800;
	margin-bottom: 18px;
}
.price-lead .from {
	display: block;
	font-size: 11px;
	text-transform: uppercase;
	color: #888;
	font-weight: 400;
	letter-spacing: 0.03em;
	margin-bottom: 2px;
}

.option-group {
	margin-bottom: 20px;
}
.option-label-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-bottom: 10px;
}
.option-label-row.tight {
	justify-content: flex-start;
	gap: 12px;
}
.option-label-row .label {
	font-weight: 700;
	text-transform: uppercase;
	font-size: 12.5px;
	letter-spacing: 0.04em;
}
.option-label-row .selected-value {
	font-size: 12.5px;
	color: #666;
}
.size-chart-link {
	font-size: 11.5px;
	text-decoration: underline;
	color: #666;
	background: none;
	border: 0;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	cursor: pointer;
}
.size-chart-link svg {
	width: 14px;
	height: 14px;
}

/* ---------------- Color swatches ---------------- */
.swatch-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}
.color-swatch {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	border: 1px solid #ccc;
	cursor: pointer;
	position: relative;
}
.color-swatch.active {
	outline: 2px solid #111;
	outline-offset: 2px;
}
.show-all-colors {
	font-size: 12px;
	text-decoration: underline;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	background: none;
	border: 0;
	cursor: pointer;
}
.show-all-colors svg {
	width: 15px;
	height: 15px;
}

/* ---------------- Pricing matrix ---------------- */
.pricing-matrix {
	width: 100%;
	border-collapse: collapse;
	margin-top: 4px;
}
.pricing-matrix th,
.pricing-matrix td {
	border: 1px solid #ddd;
	padding: 8px 6px;
	text-align: center;
	font-size: 12.5px;
}
.pricing-matrix thead th {
	background: #111;
	color: #fff;
	text-transform: uppercase;
	font-size: 10.5px;
	letter-spacing: 0.03em;
}
.pricing-matrix .size-cell {
	font-weight: 700;
	background: #f7f7f7;
	text-align: left;
	padding-left: 10px;
	/*
	 * Guarantees consistent display regardless of how an admin actually
	 * typed the pa_size term's Name (e.g. "One Size" vs "one size") —
	 * the underlying value is now the real term name (see
	 * pricing-matrix.php), not the raw slug, but this is a safety net
	 * so casing never depends on admin discipline.
	 */
	text-transform: uppercase;
}
.pricing-matrix .qty-cell input {
	width: 52px;
	padding: 5px;
	border: 1px solid #ccc;
	text-align: center;
	font-size: 12.5px;
}
.pricing-matrix .oos td {
	color: #bbb;
}
.pricing-matrix .oos .qty-cell input {
	background: #f2f2f2;
}
.size-discount-badge {
	display: block;
	font-size: 10.5px;
	font-weight: 700;
	margin-bottom: 2px;
	background: #111;
	color: #fff;
	padding: 1px 5px;
	width: fit-content;
}
/*
 * v87.5 (2026-09-04, user request): previously used a red (#b00020)
 * text color — a 3rd instance of the same "no color for UI styling,
 * grayscale only" violation found in v87.4 (same round the user
 * screenshotted this tag showing red on the pricing matrix). Now
 * bold/dark (#111, this theme's standard ink tone) instead of colored
 * — still reads as prominent against the row's own grayed-out `#bbb`
 * text (.pricing-matrix .oos td, above) purely through weight and
 * contrast, no hue needed.
 */
.oos-tag {
	font-size: 9.5px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #111;
	font-weight: 700;
	display: block;
	margin-top: 2px;
}
.b2b-matrix-note {
	font-size: 11px;
	color: #999;
	margin-top: 8px;
}

.selection-summary {
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-top: 2px solid #111;
	margin-top: 16px;
	padding-top: 14px;
	font-size: 13.5px;
}
.selection-summary strong {
	font-size: 16px;
}

.cta-row {
	display: flex;
	gap: 10px;
	margin-top: 16px;
}
/*
 * Both buttons split the row evenly (matches the approved mockup's
 * inline .btn { flex: 1 } — scoped here rather than added to base.css's
 * shared .btn so every OTHER .btn on the site keeps its normal
 * content-width sizing; this row is the one place two buttons sit
 * side-by-side and are meant to look like equal, parallel actions).
 * Round 2 (2026-09-04): "Get Custom Quote" moved into this row as a
 * real .btn.btn-outline button, next to Add to Cart — previously it
 * was a plain text link below the row (see the now-removed .quote-link
 * rule this replaced).
 */
.cta-row .btn {
	flex: 1;
}
.b2b-add-to-cart-message {
	font-size: 13px;
	margin: 10px 0 0;
	padding: 8px 12px;
	border: 1px solid #ddd;
}
/*
 * v87.4 (2026-09-04, user request): .is-error previously used a red
 * (#c0392b) border/text color — a direct violation of the sitewide
 * "no color for UI styling, grayscale only" standard (color is
 * reserved for product variant swatches). Now matches .is-success
 * exactly, same as every other notice pairing in this theme (see
 * base.css's .woocommerce-error/.woocommerce-message, which have
 * never used color to distinguish notice types either) — the message
 * text itself communicates error vs. success, not the color.
 */
.b2b-add-to-cart-message.is-error,
.b2b-add-to-cart-message.is-success {
	border-color: #111;
	color: #111;
}
.payment-icons-row {
	display: flex;
	gap: 8px;
	margin-top: 16px;
	flex-wrap: wrap;
}
.payment-icons-row span {
	border: 1px solid #ddd;
	padding: 5px 9px;
	font-size: 10.5px;
	color: #777;
}

/*
 * .modal-overlay / .modal-box (common) / .modal-close / .modal-box h3
 * now live in base.css (shared with the cart page's Save/Share Cart
 * modals) — this page-specific override just sets the larger size this
 * context's content (a full size-chart table) actually needs.
 */
.modal-box {
	max-width: 640px;
	max-height: 80vh;
	overflow: auto;
}
.size-chart-table {
	width: 100%;
	border-collapse: collapse;
}
.size-chart-table th,
.size-chart-table td {
	border: 1px solid #ddd;
	padding: 8px;
	text-align: center;
	font-size: 12.5px;
}
.size-chart-table th {
	background: #f2f2f2;
	text-transform: uppercase;
	font-size: 10.5px;
	letter-spacing: 0.03em;
}
.all-colors-grid {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 14px;
}
.all-colors-grid .color-item {
	text-align: center;
	font-size: 11px;
	cursor: pointer;
}
.all-colors-grid .color-swatch {
	margin: 0 auto 6px;
	width: 34px;
	height: 34px;
}

/* ---------------- Description / spec section ---------------- */
.description-section {
	padding: 10px 0 50px;
	border-top: 1px solid var(--line);
	margin-top: 10px;
}
.desc-grid {
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap: 40px;
	margin-top: 24px;
}
.desc-main p {
	color: var(--ink-soft);
	font-size: 14px;
}
.badge-row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 16px 0;
}
.spec-badge {
	border: 1px solid #111;
	padding: 6px 12px;
	font-size: 11.5px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	font-weight: 600;
}
.feature-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.feature-list li {
	padding: 5px 0;
	font-size: 13.5px;
	border-bottom: 1px solid #eee;
}
.feature-list li::before {
	content: '✓ ';
	color: #111;
	font-weight: 700;
}
.spec-table {
	width: 100%;
	border-collapse: collapse;
}
.spec-table th,
.spec-table td {
	padding: 8px 0;
	font-size: 13px;
	border-bottom: 1px solid #eee;
	text-align: left;
}
.spec-table th {
	color: #888;
	font-weight: 600;
	width: 40%;
	text-transform: uppercase;
	font-size: 11px;
	letter-spacing: 0.03em;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
	.product-layout {
		grid-template-columns: 1fr;
	}
	.desc-grid {
		grid-template-columns: 1fr;
	}
}
@media (max-width: 600px) {
	.gallery {
		grid-template-columns: 1fr;
	}
	.thumb-strip {
		flex-direction: row;
	}
	.all-colors-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}
