/* Final commerce presentation: truthful sale labels, paid confirmation and coherent actions. */
:root {
	--kb-action-orange: #fbaa0e;
	--kb-action-orange-hover: #f59b00;
	--kb-action-navy: #041428;
	--kb-success: #16834b;
	--kb-success-soft: #e9f8ef;
}

.kb-sale-badge,
.woocommerce span.onsale.kb-sale-badge {
	display: inline-flex;
	min-width: 0;
	min-height: 30px;
	padding: 5px 10px;
	align-items: center;
	justify-content: center;
	border: 1px solid #d94b3d;
	border-radius: 999px;
	background: #e65345;
	color: #fff;
	font-size: 12px;
	font-weight: 900;
	line-height: 1.25;
	box-shadow: 0 6px 16px rgba(180, 48, 39, .2);
}

.kb-single-sale-price {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}
.kb-single-sale-price__values {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 10px;
}
.kb-single-sale-price__values del {
	order: 1;
	color: #263445 !important;
	font-family: Tahoma, Arial, sans-serif;
	font-size: .72em !important;
	font-weight: 600 !important;
	opacity: .72;
	text-decoration-color: #d9534f;
	text-decoration-thickness: 2px;
}
.kb-single-sale-price__values ins {
	order: 2;
	color: var(--kb-action-orange) !important;
	font-family: Vazirmatn, Tahoma, sans-serif;
	font-size: 1.16em !important;
	font-weight: 950 !important;
	text-decoration: none !important;
}
.kb-sale-star {
	display: grid;
	width: 68px;
	height: 68px;
	flex: 0 0 68px;
	place-content: center;
	background: linear-gradient(145deg, #ffbe31, var(--kb-action-orange));
	color: var(--kb-action-navy);
	text-align: center;
	filter: drop-shadow(0 7px 10px rgba(251, 170, 14, .25));
	clip-path: polygon(50% 0%,61% 14%,78% 8%,82% 26%,100% 31%,89% 47%,100% 62%,82% 68%,78% 87%,60% 80%,50% 100%,39% 81%,21% 88%,18% 69%,0% 63%,11% 47%,0% 32%,18% 26%,22% 8%,40% 14%);
}
.kb-sale-star b { font-family: Vazirmatn, Tahoma, sans-serif; font-size: 17px; line-height: 1; }
.kb-sale-star small { margin-top: 3px; font-size: 9px; font-weight: 850; }
.kb-sale-star--compact,
.woocommerce span.onsale.kb-sale-star--compact {
	position: static;
	display: grid;
	width: 58px;
	height: 58px;
	min-width: 58px;
	min-height: 58px;
	padding: 0;
	place-content: center;
	border: 0;
	border-radius: 0;
	line-height: 1;
}
.kb-sale-star--compact b { font-size: 14px; }
.kb-sale-star--compact small { font-size: 8px; }
.kb-listing-sale-price { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 9px; }
.kb-listing-sale-price__values { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
:is(.kb-listing-sale-price__values, .kb-store-card__price) del { color: #263445 !important; font-size: .78em !important; font-weight: 500 !important; opacity: .7; }
:is(.kb-listing-sale-price__values, .kb-store-card__price) ins { color: var(--kb-action-orange) !important; font-size: 1.08em !important; font-weight: 900 !important; text-decoration: none !important; }
.kb-store-card__price:not(:has(del)) { color: #111827 !important; }

.kb-payment-success {
	display: flex;
	margin: 0 0 20px;
	padding: clamp(18px, 3vw, 28px);
	align-items: center;
	gap: 18px;
	border: 1px solid color-mix(in srgb, var(--kb-success) 45%, #fff);
	border-radius: 20px;
	background: linear-gradient(135deg, var(--kb-success-soft), #f8fffa);
	color: #0d5a34;
	box-shadow: 0 16px 38px rgba(22, 131, 75, .13);
}
.kb-payment-success__check {
	display: grid;
	width: 72px;
	height: 72px;
	flex: 0 0 72px;
	place-items: center;
	border-radius: 50%;
	background: var(--kb-success);
	color: #fff;
	font-size: 42px;
	font-weight: 900;
	box-shadow: 0 0 0 9px rgba(22, 131, 75, .1);
	animation: kb-success-pop .5s cubic-bezier(.2, .8, .2, 1) both;
}
.kb-payment-success h2 { margin: 0 0 4px; color: #0d5a34; font-size: clamp(20px, 3vw, 28px); }
.kb-payment-success p { margin: 0; color: #2f6c4d; }

/* One brand language for public action buttons, while destructive controls remain red. */
:is(.kb-button, .kb-card-action, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .wp-element-button):not(.remove):not(.cancel) {
	border-color: var(--kb-action-orange) !important;
	background-color: var(--kb-action-orange) !important;
	color: var(--kb-action-navy) !important;
}
:is(.kb-button, .kb-card-action, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .wp-element-button):not(.remove):not(.cancel):hover {
	border-color: var(--kb-action-orange-hover) !important;
	background-color: var(--kb-action-orange-hover) !important;
}
:is(.woocommerce button.button, .woocommerce input.button):disabled,
:is(.woocommerce button.button, .woocommerce input.button).disabled {
	opacity: .48;
}

@media (max-width: 700px) {
	.kb-single-sale-price { gap: 8px; }
	.kb-sale-star { width: 58px; height: 58px; flex-basis: 58px; }
	.kb-wc-system-page .woocommerce-cart-form table.cart td.actions {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr);
		gap: 10px;
		padding: 12px 0 0 !important;
	}
	.kb-wc-system-page .woocommerce-cart-form td.actions .coupon {
		display: grid;
		width: 100%;
		grid-template-columns: minmax(0, 1fr) minmax(108px, .34fr);
		gap: 8px;
	}
	.kb-wc-system-page .woocommerce-cart-form td.actions .coupon .input-text,
	.kb-wc-system-page .woocommerce-cart-form td.actions .coupon button,
	.kb-wc-system-page .woocommerce-cart-form td.actions > button[name="update_cart"],
	.kb-wc-system-page .woocommerce-cart-form td.actions .kb-document-button {
		width: 100% !important;
		min-height: 48px;
		margin: 0 !important;
	}
	.kb-wc-system-page .woocommerce-cart-form td.actions .coupon button { padding-inline: 10px !important; white-space: normal; }
	.kb-wc-system-page .woocommerce-cart-form td.actions .kb-document-button { display: flex; align-items: center; justify-content: center; }
	.kb-payment-success { align-items: flex-start; gap: 14px; border-radius: 16px; }
	.kb-payment-success__check { width: 54px; height: 54px; flex-basis: 54px; font-size: 32px; }
}

@keyframes kb-success-pop {
	0% { opacity: 0; transform: scale(.45) rotate(-12deg); }
	70% { transform: scale(1.08) rotate(2deg); }
	100% { opacity: 1; transform: scale(1) rotate(0); }
}
@media (prefers-reduced-motion: reduce) { .kb-payment-success__check { animation: none; } }
