.megemeria-cart-warranty-row {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid #e3dfdb;
}

.megemeria-cart-warranty-row__thumb {
	width: 90px;
	height: 90px;
	flex: none;
	overflow: hidden;
	border: 1px solid #b4b4b4;
	background: #f4eee966;
}

.megemeria-cart-warranty-row__thumb img,
.megemeria-cart-warranty-row__thumb .img-fluid {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.megemeria-cart-warranty-row__thumb-placeholder {
	display: block;
	width: 100%;
	height: 100%;
	background: #f4eee9;
}

.megemeria-cart-warranty-row__details {
	flex: 1;
	min-width: 0;
}

.megemeria-cart-warranty-row__label {
	font-size: 14px;
	font-weight: 600;
	color: #000;
	margin-bottom: 4px;
}

.megemeria-cart-warranty-row__content {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.megemeria-cart-warranty-row__name {
	flex: 1;
	font-size: 14px;
	font-weight: 300;
	color: #000;
	line-height: 1.4;
}

.megemeria-cart-warranty-row__price,
.megemeria-cart-line-totals__warranty,
.megemeria-checkout-line-totals__warranty-price {
	color: #731f3a;
	font-weight: 400;
}

.megemeria-cart-warranty-remove {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #000;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	opacity: 0.75;
}

.megemeria-cart-warranty-remove:hover {
	opacity: 1;
}

.megemeria-cart-line-totals {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 8px;
}

/* Mini-cart warranty row mirrors theme product layout */
.mini-cart-product:has(+ .megemeria-mini-cart-warranty-product) {
	margin-bottom: 0;
}

.mini-cart-product.megemeria-mini-cart-warranty-product {
	align-items: flex-start;
	margin-top: 8px;
	margin-bottom: 23px;
}

.mini-cart-product + .mini-cart-product.megemeria-mini-cart-warranty-product {
	margin-top: 8px;
}

.megemeria-mini-cart-warranty-product__placeholder {
	display: block;
	width: 100%;
	height: 100%;
	background: #f4eee9;
}

.megemeria-mini-cart-warranty-product__header {
	margin-bottom: 8px;
}

.megemeria-mini-cart-warranty-product__header .megemeria-cart-warranty-row__label {
	margin-bottom: 0;
}

.megemeria-mini-cart-warranty-product__actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.megemeria-mini-cart-warranty-product__actions .megemeria-cart-warranty-row__name {
	flex: 1;
}

/* Order warranty display (customer order pages) */
.megemeria-order-warranty--customer,
.megemeria-order-warranty--thankyou,
.megemeria-order-warranty--account,
.megemeria-order-warranty--email {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid #e3dfdb;
}

.megemeria-order-warranty--customer .megemeria-order-warranty__thumb,
.megemeria-order-warranty--thankyou .megemeria-order-warranty__thumb,
.megemeria-order-warranty--account .megemeria-order-warranty__thumb,
.megemeria-order-warranty--email .megemeria-order-warranty__thumb {
	width: 72px;
	height: 72px;
	flex: none;
	overflow: hidden;
	border: 1px solid #b4b4b4;
	background: #f4eee966;
}

.megemeria-order-warranty__placeholder {
	display: block;
	width: 100%;
	height: 100%;
	background: #f4eee9;
}

.megemeria-order-warranty--customer .megemeria-order-warranty__image,
.megemeria-order-warranty--thankyou .megemeria-order-warranty__image,
.megemeria-order-warranty--account .megemeria-order-warranty__image,
.megemeria-order-warranty--email .megemeria-order-warranty__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.megemeria-order-warranty--customer .megemeria-order-warranty__label,
.megemeria-order-warranty--thankyou .megemeria-order-warranty__label,
.megemeria-order-warranty--account .megemeria-order-warranty__label,
.megemeria-order-warranty--email .megemeria-order-warranty__label {
	font-size: 14px;
	font-weight: 600;
	color: #000;
	margin-bottom: 4px;
}

.megemeria-order-warranty--customer .megemeria-order-warranty__name,
.megemeria-order-warranty--thankyou .megemeria-order-warranty__name,
.megemeria-order-warranty--account .megemeria-order-warranty__name,
.megemeria-order-warranty--email .megemeria-order-warranty__name {
	font-size: 14px;
	font-weight: 300;
	color: #000;
	line-height: 1.4;
}

.megemeria-order-warranty--customer .megemeria-order-warranty__price,
.megemeria-order-warranty--thankyou .megemeria-order-warranty__price,
.megemeria-order-warranty--account .megemeria-order-warranty__price,
.megemeria-order-warranty--email .megemeria-order-warranty__price {
	margin-top: 4px;
	color: #731f3a;
	font-weight: 400;
}

.megemeria-order-line-totals {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
}

.megemeria-order-line-totals__warranty {
	color: #731f3a;
}

.thankyou-page .product-item-meta .megemeria-order-warranty--thankyou {
	margin-top: 10px;
	padding-top: 10px;
}

.thankyou-page .product-info .price .megemeria-order-line-totals {
	gap: 4px;
}

.thankyou-page .product-info .price .megemeria-order-line-totals__warranty {
	color: #731f3a;
}

/* Checkout separate warranty row */
body.woocommerce-checkout tr.megemeria-checkout-warranty-row td {
	border-top: 0 !important;
	padding-top: 0 !important;
	vertical-align: middle;
}

body.woocommerce-checkout tr.megemeria-checkout-warranty-row .megemeria-checkout-warranty-row__inner {
	display: flex;
	align-items: center;
	gap: 10px;
	padding-left: 28px;
}

body.woocommerce-checkout tr.megemeria-checkout-warranty-row .megemeria-checkout-warranty-row__text {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

body.woocommerce-checkout tr.megemeria-checkout-warranty-row .megemeria-checkout-warranty-row__label {
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	color: #000;
}

body.woocommerce-checkout tr.megemeria-checkout-warranty-row .megemeria-checkout-warranty-row__name {
	font-size: 15px;
	font-weight: 300;
	line-height: 1.4;
	color: #000;
}

body.woocommerce-checkout tr.megemeria-checkout-warranty-row .megemeria-checkout-warranty-row__total {
	display: inline-flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
}

body.woocommerce-checkout tr.megemeria-checkout-warranty-row + tr.cart_item td,
body.woocommerce-checkout tr.cart_item:has(+ tr.megemeria-checkout-warranty-row) td {
	border-bottom: 0 !important;
}

body.woocommerce-checkout tr.megemeria-checkout-warranty-row .megemeria-cart-warranty-remove--checkout {
	width: 20px;
	height: 20px;
	font-size: 16px;
}

@media only screen and (max-width: 700px) {
	body.woocommerce-checkout tr.megemeria-checkout-warranty-row .megemeria-checkout-warranty-row__inner {
		padding-left: 0;
	}
}
