/**
 * Mercadotelas Commerce — commercial frontend presentation.
 * Scoped to the plugin's own classes; no global layout changes.
 */

/* Shared --------------------------------------------------------------- */
.mt-commerce-volume {
	margin: 0.45rem 0 0.6rem;
	font-size: 0.875rem;
	line-height: 1.4;
}

.mt-commerce-volume__badge {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	gap: 0.25rem;
	max-width: 100%;
	padding: 0.15rem 0.55rem;
	border-radius: 999px;
	background: #e6f7f1;
	color: #0f6b52;
	font-size: 0.65rem;
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: 0.015em;
	text-transform: uppercase;
}

.mt-commerce-volume__badge--applied {
	background: #0f6b52;
	color: #fff;
}

.mt-commerce-volume__threshold {
	margin: 0;
	color: #3c434a;
}

.mt-commerce-volume__threshold strong {
	font-weight: 700;
	color: #1d2327;
}

.mt-commerce-volume__price,
.mt-commerce-volume__loop-price {
	margin: 0;
	color: #0f6b52;
	font-weight: 700;
}

.mt-commerce-volume__unit {
	font-size: 0.85em;
	font-weight: 500;
	color: #50575e;
}

/* Shop cards ----------------------------------------------------------- */
.mt-commerce-volume--loop {
	display: flex;
	flex-direction: column;
	gap: 0.12rem;
	padding: 0.45rem 0.55rem;
	border: 1px solid #d7efe6;
	border-radius: 10px;
	background: #f7fcfa;
	font-size: 0.75rem;
	line-height: 1.3;
}

.mt-commerce-volume--loop .mt-commerce-volume__badge {
	font-size: 0.6rem;
	padding: 0.1rem 0.45rem;
}

.mt-commerce-volume--loop .mt-commerce-volume__threshold {
	font-size: 0.72rem;
}

.mt-commerce-volume--loop .mt-commerce-volume__loop-price {
	font-size: 0.92rem;
	line-height: 1.2;
}

/* Product page --------------------------------------------------------- */
.mt-commerce-volume--single {
	padding: 0.85rem 1rem;
	border: 1px solid #d7efe6;
	border-radius: 12px;
	background: #f7fcfa;
}

.mt-commerce-volume__available {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
}

.mt-commerce-volume--single .mt-commerce-volume__price {
	font-size: 1.2rem;
	line-height: 1.2;
}

.mt-commerce-volume__applied {
	display: none;
	flex-direction: column;
	gap: 0.35rem;
}

.mt-commerce-volume.is-applied .mt-commerce-volume__available {
	display: none;
}

.mt-commerce-volume.is-applied .mt-commerce-volume__applied {
	display: flex;
}

.mt-commerce-volume__applied-price {
	margin: 0;
	font-size: 1.4rem;
	font-weight: 700;
	line-height: 1.15;
	color: #0f6b52;
}

.mt-commerce-volume__savings {
	align-self: flex-start;
	margin: 0;
	padding: 0.18rem 0.6rem;
	border-radius: 999px;
	background: #e6f7f1;
	color: #0f6b52;
	font-size: 0.8rem;
	font-weight: 700;
	line-height: 1.35;
}

.mt-commerce-volume__savings[hidden] {
	display: none;
}

.mt-commerce-volume__purchase-info {
	display: flex;
	flex-wrap: wrap;
	gap: 0.15rem 0.8rem;
	margin: 0.65rem 0 0;
	color: #646970;
	font-size: 0.72rem;
	line-height: 1.4;
}

.mt-commerce-volume__purchase-item {
	display: inline-block;
}

.mt-commerce-has-applied .price {
	opacity: 0.55;
}

/* Cart ----------------------------------------------------------------- */
.mt-commerce-unit {
	white-space: nowrap;
	color: #50575e;
}

.mt-commerce-cart-price {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.25rem 0.35rem;
}

.mt-commerce-cart-base {
	color: #8a8f98;
	font-size: 0.85em;
	font-weight: 400;
}

.mt-commerce-cart-effective {
	color: #0f6b52;
	font-weight: 700;
}

.mt-commerce-cart-note {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem 0.5rem;
	margin-top: 0.25rem;
	font-size: 0.72rem;
	line-height: 1.35;
}

.mt-commerce-cart-badge {
	display: inline-block;
	padding: 0.1rem 0.45rem;
	border-radius: 999px;
	background: #e6f7f1;
	color: #0f6b52;
	font-weight: 700;
}

.mt-commerce-cart-savings {
	color: #0f6b52;
	font-weight: 600;
}

.mt-commerce-cart-summary {
	margin: 0.75rem 0 0;
	padding: 0.55rem 0.75rem;
	border: 1px solid #d7efe6;
	border-radius: 8px;
	background: #f7fcfa;
	color: #0f6b52;
	font-size: 0.85rem;
	font-weight: 600;
	line-height: 1.4;
}

.mt-commerce-cart-summary::before {
	content: "✓";
	margin-right: 0.35rem;
	font-weight: 700;
}

/* Quantity input ------------------------------------------------------- */
/*
 * Decimal products use type="text" + inputmode="decimal" (phase 4) because
 * type="number" rejects the comma on several mobile browsers. Flatsome only
 * centers ".quantity input[type=number]", so the text variant kept the
 * browser default. Center it explicitly without touching the type or the
 * quantity logic. Specificity (0,3,1) beats ".quantity input[type=number]"
 * (0,2,1), so no !important is needed.
 */
.quantity input.qty[type="text"] {
	text-align: center;
}

/* Checkout line ------------------------------------------------------- */
.woocommerce-checkout-review-order-table .mt-commerce-checkout-quantity {
	display: block;
	float: none;
	width: 100%;
	margin: 0.15rem 0 0;
	text-align: left;
	font-size: 1em;
}

.mt-commerce-checkout-details {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	margin-top: 0.3rem;
	font-size: 0.85em;
	line-height: 1.4;
}

.mt-commerce-checkout-unit-price {
	color: #50575e;
}

.mt-commerce-checkout-volume-badge {
	align-self: flex-start;
	padding: 0.15rem 0.5rem;
	border-radius: 999px;
	background: #e6f7f1;
	color: #0f6b52;
	font-size: 0.85em;
	font-weight: 700;
	line-height: 1.4;
}

.mt-commerce-checkout-saving {
	color: #0f6b52;
	font-size: 0.95em;
	font-weight: 700;
}

/* Checkout ------------------------------------------------------------- */
.mt-commerce-transfer-promo {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin: 0 0 0.9rem;
	padding: 0.65rem 0.8rem;
	border: 1px solid #bfe6d6;
	border-radius: 10px;
	background: #f2fbf7;
}

.mt-commerce-transfer-promo.is-hidden {
	display: none;
}

.mt-commerce-transfer-promo__badge {
	display: inline-block;
	padding: 0.2rem 0.55rem;
	border-radius: 999px;
	background: #0f6b52;
	color: #fff;
	font-size: 0.72rem;
	font-weight: 700;
	line-height: 1.3;
	white-space: nowrap;
}

.mt-commerce-transfer-promo__text {
	margin: 0;
	color: #1d2327;
	font-size: 0.85rem;
	line-height: 1.4;
}

#payment li.payment_method_bacs.is-selected {
	padding: 0.35rem 0.5rem;
	border: 1px solid #bfe6d6;
	border-radius: 8px;
	background: #f7fcfa;
}

#order_review tr.fee th,
#order_review tr.fee td,
.woocommerce-checkout-review-order-table tr.fee th,
.woocommerce-checkout-review-order-table tr.fee td {
	color: #0f6b52;
	background: #f2fbf7;
}

/* Responsive ----------------------------------------------------------- */
@media only screen and (max-width: 48em) {
	.mt-commerce-volume--single {
		padding: 0.7rem 0.8rem;
	}

	.mt-commerce-volume__applied-price {
		font-size: 1.25rem;
	}

	.mt-commerce-cart-price {
		flex-direction: column;
		align-items: flex-start;
		gap: 0;
	}

	.mt-commerce-cart-effective {
		line-height: 1.2;
	}

	.mt-commerce-transfer-promo {
		align-items: flex-start;
		flex-direction: column;
		gap: 0.35rem;
	}
}

/* Mobile polish -------------------------------------------------------- */
.mt-commerce-volume__badge-text--mobile,
.mt-commerce-volume__threshold-text--mobile {
	display: none;
}

@media only screen and (max-width: 549px) {
	.mt-commerce-volume__badge-text--desktop,
	.mt-commerce-volume__threshold-text--desktop {
		display: none;
	}

	.mt-commerce-volume__badge-text--mobile,
	.mt-commerce-volume__threshold-text--mobile {
		display: inline;
	}

	/* Shop cards */
	.mt-commerce-volume--loop {
		gap: 0.08rem;
		margin: 0.35rem 0 0.45rem;
		padding: 0.38rem 0.45rem;
		border-color: #c3e7d9;
		border-radius: 8px;
		background: #eefaf4;
	}

	.mt-commerce-volume--loop .mt-commerce-volume__badge {
		padding: 0.08rem 0.4rem;
		font-size: 0.66rem;
		letter-spacing: 0.01em;
	}

	.mt-commerce-volume--loop .mt-commerce-volume__threshold {
		font-size: 0.72rem;
	}

	.mt-commerce-volume--loop .mt-commerce-volume__loop-price {
		color: #0b5c46;
		font-size: 1.02rem;
		font-weight: 800;
	}

	.mt-commerce-volume--loop .mt-commerce-volume__unit {
		font-size: 0.78em;
	}

	.mt-commerce-volume--loop .mt-commerce-volume__loop-price .amount,
	.mt-commerce-volume--single .mt-commerce-volume__price .amount,
	.mt-commerce-volume--single .mt-commerce-volume__applied-price .amount {
		color: inherit;
	}

	/* Product page */
	.mt-commerce-volume--single {
		margin-top: 0.35rem;
		padding: 0.65rem 0.75rem;
	}

	.mt-commerce-volume--single .mt-commerce-volume__badge {
		padding: 0.12rem 0.5rem;
		font-size: 0.72rem;
	}

	.mt-commerce-volume--single .mt-commerce-volume__threshold {
		font-size: 0.85rem;
	}

	.mt-commerce-volume--single .mt-commerce-volume__price,
	.mt-commerce-volume--single .mt-commerce-volume__applied-price {
		font-size: 1.32rem;
	}

	.mt-commerce-volume__purchase-info {
		gap: 0.1rem 0.65rem;
		margin-top: 0.5rem;
		font-size: 0.7rem;
	}

	/* Cart */
	.mt-commerce-cart-price {
		flex-direction: row;
		flex-wrap: wrap;
		gap: 0 0.3rem;
	}

	.mt-commerce-cart-base {
		flex: 0 0 100%;
	}

	.mt-commerce-cart-badge {
		font-size: 0.68rem;
		line-height: 1.3;
	}

	/* Checkout */
	.mt-commerce-transfer-promo {
		padding: 0.55rem 0.65rem;
	}

	.mt-commerce-transfer-promo__badge {
		font-size: 0.68rem;
	}

	.mt-commerce-checkout-details {
		gap: 0.3rem;
	}
}

@media only screen and (max-width: 389px) {
	.mt-commerce-volume--loop .mt-commerce-volume__badge {
		padding: 0.06rem 0.3rem;
		font-size: 0.6rem;
		letter-spacing: 0;
	}
}
