:root {
	--st-checkout-primary: #e5007f;
	--st-checkout-primary-dark: #8f136f;
	--st-checkout-primary-soft: #fbe8f3;
	--st-checkout-border: #e6d7e2;
	--st-checkout-text: #342833;
	--st-checkout-muted: #7d6979;
	--st-checkout-success: #2d8a57;
	--st-checkout-warning: #b7791f;
	--st-checkout-surface: #fff8fc;
	--st-checkout-shadow: 0 12px 32px rgba(86, 24, 68, 0.14);
}

#frontendCartModal .modal-content,
#cartReviewModal .modal-content,
#addToCartModal .modal-content,
#postCheckoutModal .modal-content {
	border: 1px solid var(--st-checkout-border);
	border-radius: 10px;
	overflow: hidden;
	box-shadow: var(--st-checkout-shadow);
}

#cartReviewModal {
	z-index: 1050;
}

#addToCartModal {
	z-index: 1065;
}

body.checkout-editing-active .modal-backdrop {
	z-index: 1045;
}

#frontendCartModal .modal-header,
.checkout-modal-header {
	padding: 14px 18px;
	color: #fff;
	border-bottom: 0;
	background: linear-gradient(135deg, var(--st-checkout-primary-dark), var(--st-checkout-primary));
}

#frontendCartModal .modal-header .close,
.checkout-modal-header .close {
	color: #fff;
	opacity: 0.9;
	text-shadow: none;
}

#frontendCartModal .modal-title,
.checkout-modal-title {
	font-weight: 700;
	letter-spacing: 0.01em;
}

.checkout-shell {
	color: var(--st-checkout-text);
}

.checkout-shell .panel,
.checkout-card,
.checkout-section,
.checkout-summary-card,
.checkout-customer-card {
	border: 1px solid var(--st-checkout-border);
	border-radius: 8px;
	box-shadow: none;
	background: #fff;
}

.checkout-section,
.checkout-summary-card,
.checkout-customer-card {
	padding: 12px;
	margin-bottom: 12px;
}

.checkout-summary-card {
	background: linear-gradient(180deg, #fff, var(--st-checkout-surface));
}

.checkout-summary-topline {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
	color: var(--st-checkout-muted);
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.checkout-grand-total {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
	font-weight: 700;
	color: var(--st-checkout-primary-dark);
}

.checkout-grand-total strong {
	font-size: 24px;
	line-height: 1.1;
}

.checkout-microcopy {
	color: var(--st-checkout-muted);
	font-size: 12px;
}

.checkout-section-title {
	margin: 0 0 8px;
	font-size: 16px;
	font-weight: 700;
	color: var(--st-checkout-text);
}

.checkout-section-subtitle {
	margin: -2px 0 8px;
	color: var(--st-checkout-muted);
	font-size: 12px;
}

.checkout-empty-state {
	border: 1px dashed var(--st-checkout-border);
	border-radius: 8px;
	padding: 28px 18px;
	background: var(--st-checkout-surface);
}

.checkout-empty-state .fa {
	color: var(--st-checkout-primary);
}

.checkout-cart-table {
	margin-bottom: 0;
}

.checkout-cart-table > thead > tr > th,
.checkout-cart-table > tbody > tr > td,
.checkout-cart-table > tfoot > tr > td {
	padding-top: 6px;
	padding-bottom: 6px;
}

.checkout-cart-table > thead > tr > th {
	border-bottom: 1px solid var(--st-checkout-border);
	color: var(--st-checkout-muted);
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.checkout-cart-table > tbody > tr > td,
.checkout-cart-table > tfoot > tr > td {
	vertical-align: middle;
}

.checkout-inline-total {
	color: var(--st-checkout-primary-dark);
	font-weight: 700;
}

.checkout-chip {
	display: inline-block;
	padding: 4px 8px;
	border-radius: 999px;
	background: var(--st-checkout-primary-soft);
	color: var(--st-checkout-primary-dark);
	font-size: 11px;
	font-weight: 700;
}

.checkout-info-box,
.checkout-status-box {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 10px 12px;
	border-radius: 8px;
	margin-bottom: 12px;
}

.checkout-info-box {
	background: #f6f1f6;
	color: var(--st-checkout-text);
}

.checkout-status-box.warning {
	background: #fff6e5;
	color: var(--st-checkout-warning);
}

.checkout-status-box.success {
	background: #eef9f2;
	color: var(--st-checkout-success);
}

.checkout-form-group .form-control,
.checkout-shell .form-control,
.checkout-shell .select2-selection--single {
	border: 1px solid #ccb9c7;
	border-radius: 6px;
	box-shadow: none;
	min-height: 38px;
}

.checkout-form-group label,
.checkout-shell label {
	color: var(--st-checkout-text);
	font-weight: 700;
}

.checkout-shell .form-control:focus,
.checkout-shell .select2-selection--single:focus,
.checkout-shell .form-control:active {
	border-color: var(--st-checkout-primary);
	box-shadow: 0 0 0 3px rgba(229, 0, 127, 0.12) !important;
}

.checkout-payment-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 8px;
	margin-bottom: 8px;
}

.checkout-payment-grid-primary {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.checkout-payment-toggle {
	margin-bottom: 0;
	width: 100%;
	min-height: 46px;
	padding: 8px 10px;
	font-weight: 700;
}

.checkout-customer-inline {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
	margin-bottom: 10px;
}

.customer-contact-group {
	margin-bottom: 0;
}

.checkout-item-actions {
	display: flex;
	justify-content: flex-end;
	margin-top: 8px;
}

.checkout-payment-choice {
	position: relative;
	display: block;
	margin: 0;
	padding: 8px 10px;
	min-height: 46px;
	border: 1px solid #d8c2d0;
	border-radius: 8px;
	background: #fff;
	cursor: pointer;
	transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.checkout-payment-choice:hover,
.checkout-payment-choice:focus {
	border-color: var(--st-checkout-primary);
	box-shadow: 0 10px 20px rgba(112, 35, 89, 0.1);
	transform: translateY(-1px);
}

.checkout-payment-choice.active {
	border-color: var(--st-checkout-primary);
	background: var(--st-checkout-primary-soft);
	box-shadow: 0 0 0 2px rgba(229, 0, 127, 0.08);
}

.checkout-payment-choice input[type="radio"] {
	position: absolute;
	top: 10px;
	right: 10px;
	margin: 0;
}

.checkout-payment-choice-title {
	display: block;
	margin-top: 2px;
	font-weight: 700;
	color: var(--st-checkout-text);
}

.checkout-payment-choice-note {
	display: block;
	margin-top: 4px;
	color: var(--st-checkout-muted);
	font-size: 11px;
	line-height: 1.4;
}

.checkout-payment-choice img {
	max-height: 26px;
	width: auto;
}

.purchase-options {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 10px;
	padding-left: 0;
	list-style: none;
}

.purchase-options > li {
	float: none !important;
	width: auto !important;
}

.purchase-options > li > label {
	position: relative;
	display: block;
	min-height: 84px;
	margin: 0;
	padding: 12px 14px;
	border: 1px solid #d8c2d0;
	border-radius: 8px;
	background: #fff;
	cursor: pointer;
	transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.purchase-options > li > label:hover,
.purchase-options > li > label:focus {
	border-color: var(--st-checkout-primary);
	box-shadow: 0 10px 20px rgba(112, 35, 89, 0.1);
	transform: translateY(-1px);
}

.purchase-options > li > label img {
	display: block;
	max-height: 26px;
	width: auto !important;
	margin-bottom: 10px;
}

.purchase-options input[type="radio"] {
	margin-right: 6px;
}

.purchase-options .payment-form {
	grid-column: 1 / -1;
	padding: 12px 0 0;
}

.checkout-action-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

.checkout-action-row .btn {
	min-height: 40px;
	padding: 9px 16px;
	border-radius: 6px;
}

.checkout-btn-primary,
.checkout-shell .btn-checkout-primary,
.checkout-shell .btn.btn-success,
.checkout-shell .btn.btn-primary {
	background: linear-gradient(135deg, var(--st-checkout-primary-dark), var(--st-checkout-primary));
	border-color: var(--st-checkout-primary-dark);
	color: #fff;
}

.checkout-shell .btn.btn-primary:hover,
.checkout-shell .btn.btn-success:hover,
.checkout-shell .btn.btn-primary:focus,
.checkout-shell .btn.btn-success:focus,
.checkout-btn-primary:hover,
.checkout-btn-primary:focus {
	background: linear-gradient(135deg, #7b105f, #c4006d);
	border-color: #7b105f;
	color: #fff;
}

.checkout-shell .btn.btn-default,
.checkout-shell .btn.btn-link,
.checkout-btn-secondary {
	border-color: #d4c3cf;
	color: var(--st-checkout-text);
	background: #fff;
}

.checkout-shell .btn.btn-danger {
	background: #fff5f7;
	border-color: #edb8cc;
	color: #9b1c4f;
}

.checkout-shell .btn.btn-danger:hover,
.checkout-shell .btn.btn-danger:focus {
	background: #fce8ef;
	border-color: #df8eb0;
	color: #8b1848;
}

.checkout-qty-control {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.checkout-qty-control .form-control,
.checkout-cart-table .cart-qty-input,
.checkout-cart-table .cart-discount-input {
	min-width: 84px;
	text-align: center;
}

.checkout-pill-note {
	display: inline-block;
	margin-left: 6px;
	padding: 2px 8px;
	border-radius: 999px;
	background: #f2eef1;
	color: var(--st-checkout-muted);
	font-size: 11px;
}

.checkout-help-link {
	color: var(--st-checkout-primary-dark);
	font-weight: 700;
}

.checkout-item-image,
.checkout-product-image {
	width: 44px;
	height: 44px;
	object-fit: cover;
	border-radius: 8px;
	border: 1px solid var(--st-checkout-border);
}

.checkout-floating-summary {
	position: sticky;
	top: 10px;
}

.checkout-modal-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
	gap: 18px;
}

.checkout-section-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 12px;
}

.checkout-details-section {
	margin-top: 0;
}

.checkout-details-total {
	min-width: 170px;
	padding: 10px 12px;
	border: 1px solid var(--st-checkout-border);
	border-radius: 8px;
	background: var(--st-checkout-surface);
}

.checkout-details-total strong {
	font-size: 22px;
}

.checkout-summary-list {
	margin: 12px 0 0;
	padding: 0;
	list-style: none;
}

.checkout-summary-list li {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	padding: 7px 0;
	border-top: 1px solid #f0e4eb;
}

.checkout-summary-list li:first-child {
	border-top: 0;
	padding-top: 0;
}

.checkout-cart-footer-note {
	margin-top: 10px;
	font-size: 12px;
	color: var(--st-checkout-muted);
}

.checkout-customer-modes {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 14px;
}

.checkout-customer-mode {
	padding: 8px 12px;
	border: 1px solid #d9c9d5;
	border-radius: 999px;
	background: #fff;
	color: var(--st-checkout-text);
	cursor: pointer;
	font-size: 12px;
	font-weight: 700;
}

.checkout-customer-mode.active {
	border-color: var(--st-checkout-primary);
	background: var(--st-checkout-primary-soft);
	color: var(--st-checkout-primary-dark);
}

.checkout-inline-status {
	margin-top: 6px;
	min-height: 18px;
	font-size: 12px;
}

.checkout-submit-primary {
	min-width: 220px;
}

.checkout-auto-note {
	margin-top: 6px;
	color: var(--st-checkout-muted);
	font-size: 11px;
}

.checkout-mobile-sticky {
	position: sticky;
	bottom: 0;
	z-index: 3;
	padding: 12px 14px;
	margin: 14px -10px -10px;
	border-top: 1px solid var(--st-checkout-border);
	background: rgba(255, 250, 253, 0.97);
	backdrop-filter: blur(8px);
}

.checkout-mobile-sticky .checkout-grand-total strong {
	font-size: 20px;
}

.checkout-shell .alert {
	border-radius: 8px;
}

@media (max-width: 991px) {
	.checkout-modal-grid {
		grid-template-columns: 1fr;
	}

	.checkout-floating-summary {
		position: static;
	}
}

@media (max-width: 767px) {
	.checkout-section,
	.checkout-summary-card,
	.checkout-customer-card {
		padding: 10px;
	}

	.checkout-section-header {
		flex-direction: column;
	}

	.checkout-details-total {
		width: 100%;
	}

	.checkout-customer-inline,
	.checkout-payment-grid.checkout-payment-grid-primary {
		grid-template-columns: 1fr;
	}

	.checkout-payment-grid:not(.checkout-payment-grid-primary) {
		grid-template-columns: 1fr 1fr;
	}

	.checkout-action-row {
		flex-direction: column;
		align-items: stretch;
	}

	.checkout-action-row .btn,
	.checkout-submit-primary {
		width: 100%;
		min-width: 0;
	}

	.checkout-cart-table > thead {
		display: none;
	}

	.checkout-cart-table > tbody > tr {
		display: block;
		margin-bottom: 12px;
		border: 1px solid var(--st-checkout-border);
		border-radius: 8px;
		overflow: hidden;
		background: #fff;
	}

	.checkout-cart-table > tbody > tr > td {
		display: block;
		width: 100% !important;
		border-top: 1px solid #f3ebf0;
	}

	.checkout-cart-table > tbody > tr > td:first-child {
		border-top: 0;
	}

	.checkout-cart-table > tfoot > tr > td {
		display: block;
		width: 100%;
		text-align: left !important;
	}
}
