/*
 * Cart page - custom part line item layout (Part Number / Part Name /
 * Model Note / Part Note / Availability). Styles the .mre-cart-part-details
 * block added in woocommerce/cart/cart.php. Kept in its own file, same as
 * footer.css, since it's specific to this one template.
 */

.mre-cart-part-details {
	margin: 6px 0 0;
}

.mre-cart-part-row {
	margin: 0 0 4px;
	font-size: 13px;
	line-height: 1.5;
}

.mre-cart-part-row:last-child {
	margin-bottom: 0;
}

.mre-cart-part-label {
	font-weight: 700;
	color: #333;
	margin-right: 4px;
}

.mre-cart-part-value {
	color: #555;
}

.mre-cart-part-instock {
	color: #2f8f5b;
	font-weight: 600;
}

.mre-cart-part-nilstock {
	color: #333;
	font-weight: 600;
}

.mre-cart-part-link {
	text-decoration: underline;
}
.mre-cart-part-link:hover {
	text-decoration: none;
}

/*
 * Part's own photo, shown in the normal product-thumbnail column (left
 * side, same spot a regular WooCommerce cart thumbnail sits) rather than
 * as a row inside the text details. An empty placeholder box renders
 * when no photo exists yet, so the column is a consistent size either
 * way instead of the row jumping around.
 */
.mre-cart-part-thumb {
	display: block;
	width: 110px;
	height: 110px;
	/* cover, not contain: a real photo fills the whole box edge-to-edge
	   instead of leaving empty letterboxing space around it when its own
	   aspect ratio doesn't match the box - the "no image" placeholder is
	   a simple icon graphic, so covering it crops in a bit rather than
	   distorting it, which reads fine at this size. */
	object-fit: cover;
	border: 1px solid #e2e2e2;
	border-radius: 4px;
	background: #fff;
}

/*
 * Lightbox for the part photo (assets/js/cart.js) - opens in place
 * instead of a new browser tab.
 */
.mre-cart-photo-lightbox {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.75);
	z-index: 10000;
	align-items: center;
	justify-content: center;
	padding: 40px;
}
.mre-cart-photo-lightbox.is-open {
	display: flex;
}
.mre-cart-photo-lightbox img {
	max-width: 100%;
	max-height: 100%;
	border-radius: 4px;
	background: #fff;
}
.mre-cart-photo-lightbox-close {
	position: absolute;
	top: 18px;
	right: 24px;
	background: none;
	border: none;
	color: #fff;
	font-size: 32px;
	line-height: 1;
	cursor: pointer;
	padding: 4px;
}
