.megastar-catalog {
	--megastar-border: #d8dee5;
	--megastar-muted: #64748b;
	--megastar-primary: #174a7e;
	max-width: 1200px;
	margin: 0 auto;
	color: #172033;
}

.megastar-auxiliary-label {
	margin: 0 0 12px;
	padding: 10px 12px;
	border-left: 4px solid #dba617;
	background: #fff8e5;
	color: #5f4700;
}

.megastar-visual-catalog {
	--megastar-visual-primary: #174a7e;
	--megastar-visual-border: #d8dee5;
	--megastar-visual-muted: #5f6b7a;
	max-width: 1240px;
	margin: 0 auto;
	color: #172033;
	outline: none;
}

.megastar-visual-catalog:focus-visible {
	outline: 3px solid rgba(23, 74, 126, 0.35);
	outline-offset: 4px;
}

.megastar-visual-header {
	display: flex;
	flex-wrap: wrap;
	align-items: end;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 18px;
	padding: 16px;
	border: 1px solid var(--megastar-visual-border);
	border-radius: 8px;
	background: #fff;
}

.megastar-visual-header h2 {
	margin: 2px 0 0;
	font-size: clamp(1.25rem, 2vw, 1.8rem);
}

.megastar-visual-mode {
	margin: 0;
	color: var(--megastar-visual-muted);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.megastar-visual-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
}

.megastar-visual-controls select,
.megastar-page-button {
	min-height: 40px;
	padding: 7px 12px;
	border: 1px solid var(--megastar-visual-border);
	border-radius: 5px;
	background: #fff;
	color: #172033;
	font: inherit;
}

.megastar-visual-controls select {
	max-width: min(360px, 48vw);
}

.megastar-page-button {
	border-color: var(--megastar-visual-primary);
	background: var(--megastar-visual-primary);
	color: #fff;
	cursor: pointer;
}

.megastar-page-button:disabled {
	border-color: #a9b2bd;
	background: #a9b2bd;
	cursor: not-allowed;
}

.megastar-page-counter {
	min-width: 54px;
	color: var(--megastar-visual-muted);
	font-variant-numeric: tabular-nums;
	text-align: center;
}

.megastar-visual-stage {
	position: relative;
	padding: clamp(8px, 2vw, 24px);
	border-radius: 10px;
	background: #cfd3d8;
}

.megastar-page-slide[hidden] {
	display: none;
}

.megastar-stage-loading {
	position: absolute;
	inset: 0;
	z-index: 20;
	display: none;
	align-items: center;
	justify-content: center;
	gap: 10px;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.78);
	color: var(--megastar-visual-primary, #174a7e);
	font-weight: 600;
}

.megastar-stage-is-loading .megastar-stage-loading {
	display: flex;
}

.megastar-stage-spinner {
	width: 26px;
	height: 26px;
	border: 3px solid var(--megastar-visual-border, #d8dee5);
	border-top-color: var(--megastar-visual-primary, #174a7e);
	border-radius: 50%;
	animation: megastar-stage-spin 0.8s linear infinite;
}

@keyframes megastar-stage-spin {
	to {
		transform: rotate(360deg);
	}
}

.megastar-page-meta {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px;
	max-width: 900px;
	margin: 0 auto 10px;
	color: #263242;
	font-size: 0.9rem;
}

.megastar-page-viewport {
	width: 100%;
	overflow: hidden;
}

.megastar-page-scale {
	position: relative;
	margin: 0 auto;
}

.megastar-rendered-page {
	position: absolute;
	top: 0;
	left: 0;
	overflow: hidden;
	box-shadow: 0 5px 22px rgba(15, 23, 42, 0.28);
	isolation: isolate;
	transform-origin: top left;
	-webkit-print-color-adjust: exact;
	print-color-adjust: exact;
}

.megastar-page-object {
	position: absolute;
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	-webkit-print-color-adjust: exact;
	print-color-adjust: exact;
}

.megastar-page-text {
	display: block;
	line-height: 1;
	white-space: pre;
	overflow: visible;
}

.megastar-page-image {
	overflow: hidden;
	background: transparent;
}

.megastar-page-image img {
	position: absolute;
	display: block;
	max-width: none;
	max-height: none;
	border: 0;
	user-select: none;
	pointer-events: none;
}

.megastar-page-image .megastar-full-image {
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: fill;
}

.megastar-crop-window {
	position: absolute;
	overflow: hidden;
}

.megastar-image-missing {
	display: grid;
	place-items: center;
	border: 1px dashed #777;
	background: #eee;
	color: #333;
	font: 10px/1.2 Arial, sans-serif;
}

.megastar-page-line > div {
	position: absolute;
}

.megastar-shape-svg {
	display: block;
	width: 100%;
	height: 100%;
	overflow: visible;
}

.megastar-visual-help {
	margin: 12px 0 0;
	color: var(--megastar-visual-muted);
	font-size: 0.9rem;
	text-align: center;
}

.megastar-catalog-header {
	margin-bottom: 24px;
}

.megastar-catalog-header h2 {
	margin: 0 0 18px;
}

.megastar-catalog-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: end;
	gap: 12px;
	padding: 16px;
	border: 1px solid var(--megastar-border);
	border-radius: 8px;
	background: #f8fafc;
}

.megastar-catalog-filters label {
	display: grid;
	flex: 1 1 220px;
	gap: 6px;
	margin: 0;
	font-weight: 600;
}

.megastar-catalog-filters input,
.megastar-catalog-filters select,
.megastar-catalog-filters button {
	min-height: 42px;
	padding: 8px 12px;
	border: 1px solid var(--megastar-border);
	border-radius: 5px;
	font: inherit;
}

.megastar-catalog-filters button {
	border-color: var(--megastar-primary);
	background: var(--megastar-primary);
	color: #fff;
	cursor: pointer;
}

.megastar-product-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 20px;
}

.megastar-product-card {
	overflow: hidden;
	border: 1px solid var(--megastar-border);
	border-radius: 9px;
	background: #fff;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.megastar-product-image {
	display: grid;
	height: 220px;
	place-items: center;
	padding: 12px;
	background: #f8fafc;
	color: var(--megastar-muted);
}

.megastar-product-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.megastar-product-content {
	padding: 16px;
}

.megastar-product-content h3 {
	margin: 4px 0 8px;
	font-size: 1.1rem;
	line-height: 1.35;
}

.megastar-product-category,
.megastar-product-sku {
	margin: 0 0 7px;
	color: var(--megastar-muted);
	font-size: 0.9rem;
}

.megastar-product-category {
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.megastar-product-content dl {
	margin: 14px 0 0;
}

.megastar-product-content dl div {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 6px 0;
	border-top: 1px solid #eef2f6;
}

.megastar-product-content dt,
.megastar-product-content dd {
	margin: 0;
}

.megastar-product-content dd {
	font-weight: 700;
}

.megastar-catalog-empty {
	padding: 20px;
	border: 1px solid var(--megastar-border);
	border-radius: 6px;
	background: #f8fafc;
}

@media (max-width: 540px) {
	.megastar-product-grid {
		grid-template-columns: 1fr;
	}

	.megastar-visual-header {
		align-items: stretch;
	}

	.megastar-visual-controls {
		justify-content: flex-start;
	}

	.megastar-visual-controls label {
		flex: 1 1 100%;
		order: -1;
	}

	.megastar-visual-controls select {
		width: 100%;
		max-width: none;
	}
}

@media print {
	.megastar-visual-header,
	.megastar-visual-help,
	.megastar-page-meta {
		display: none !important;
	}

	.megastar-visual-stage {
		padding: 0;
		background: #fff;
	}

	.megastar-rendered-page {
		box-shadow: none;
	}
}

.megastar-seller-workspace {
	--megastar-seller-bg: #0e1117;
	--megastar-seller-head: #151b27;
	--megastar-seller-panel: #111722;
	--megastar-seller-card: #1a2130;
	--megastar-seller-border: #2b3344;
	--megastar-seller-card-border: #2e384b;
	--megastar-seller-input-border: #3a455b;
	--megastar-seller-text: #e8edf7;
	--megastar-seller-muted: #9aa4b2;
	--megastar-seller-accent: #7ee7f3;
	--megastar-seller-primary: #26718d;
	width: calc(100vw - 24px);
	max-width: none;
	margin-right: calc(50% - 50vw + 12px);
	margin-left: calc(50% - 50vw + 12px);
	color: var(--megastar-seller-text);
}

.megastar-seller-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
	padding: 9px 14px;
	border: 1px solid var(--megastar-seller-border);
	border-radius: 9px;
	background: var(--megastar-seller-head);
	color: var(--megastar-seller-text);
}

.megastar-seller-toolbar > strong {
	color: var(--megastar-seller-accent);
	font-weight: 800;
}

.megastar-seller-version-badge {
	display: inline-block;
	padding: 4px 8px;
	border: 1px solid #26718d;
	border-radius: 999px;
	background: #0e131d;
	color: #bff4ff;
	font: 800 12px/1 Arial, sans-serif;
	white-space: nowrap;
}

.megastar-seller-print-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
}

.megastar-seller-print-actions button,
.megastar-clear-cart {
	min-height: 38px;
	padding: 7px 11px;
	border: 1px solid #3a455b;
	border-radius: 7px;
	background: #1a2130;
	color: var(--megastar-seller-text);
	font: inherit;
	cursor: pointer;
}

.megastar-seller-print-actions button:hover,
.megastar-seller-print-actions button:focus,
.megastar-seller-cart-actions button:hover,
.megastar-seller-cart-actions button:focus {
	border-color: var(--megastar-seller-accent);
	color: #fff;
}

.megastar-seller-advanced-actions {
	width: 100%;
	color: var(--megastar-seller-muted);
	font-size: 12px;
}

.megastar-seller-advanced-actions summary {
	cursor: pointer;
	margin-bottom: 6px;
}

.megastar-seller-advanced-actions button {
	min-height: 34px;
	padding: 6px 10px;
	border: 1px dashed #4d5a72;
	border-radius: 7px;
	background: transparent;
	color: var(--megastar-seller-muted);
	font: inherit;
	cursor: pointer;
}

.megastar-seller-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) clamp(380px, 34vw, 520px);
	align-items: start;
	gap: 16px;
	padding: 12px;
	border-radius: 12px;
	background: var(--megastar-seller-bg);
}

.megastar-seller-catalog {
	min-width: 0;
}

.megastar-visual-catalog--seller {
	max-width: none;
}

.megastar-visual-catalog--seller .megastar-visual-header {
	margin-bottom: 10px;
	padding: 10px 12px;
}

.megastar-visual-catalog--seller .megastar-visual-stage {
	padding: clamp(6px, 1vw, 14px);
}

.megastar-seller-panel {
	position: sticky;
	top: 18px;
	display: flex;
	flex-direction: column;
	min-height: min(820px, calc(100vh - 24px));
	max-height: calc(100vh - 36px);
	overflow: hidden;
	padding: 0;
	border: 1px solid var(--megastar-seller-border);
	border-radius: 14px;
	background: var(--megastar-seller-panel);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.34);
}

.megastar-seller-cart-head {
	flex: 0 0 auto;
	padding: 10px 12px;
	border-bottom: 1px solid var(--megastar-seller-border);
	background: var(--megastar-seller-panel);
}

.megastar-seller-cart-head h2 {
	margin: 0;
	color: #fff;
	font-size: 15px;
	font-weight: 800;
}

.megastar-seller-badge {
	display: inline-block;
	margin-left: 6px;
	padding: 2px 7px;
	border: 1px solid #26718d;
	border-radius: 999px;
	background: #194e65;
	color: #bff4ff;
	font-size: 11px;
	font-weight: 600;
	vertical-align: middle;
}

.megastar-seller-hint {
	margin: 4px 0 0;
	color: var(--megastar-seller-muted);
	font-size: 11px;
	line-height: 1.35;
}

.megastar-seller-quote-data {
	margin-top: 8px;
}

.megastar-seller-edit-quote {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	width: 100%;
	padding: 8px 9px;
	border: 1px solid var(--megastar-seller-border);
	border-radius: 9px;
	background: #0e131d;
	color: #fff;
	font-size: 12px;
	font-weight: 800;
	cursor: pointer;
	text-align: left;
}

.megastar-seller-edit-quote::before {
	content: "i";
	display: inline-grid;
	width: 18px;
	height: 18px;
	place-items: center;
	border: 1px solid #3a455b;
	border-radius: 50%;
	color: var(--megastar-seller-accent);
	font-weight: 900;
}

.megastar-seller-edit-quote span {
	margin-right: auto;
}

.megastar-seller-edit-quote small {
	color: var(--megastar-seller-muted);
	font-size: 10px;
	font-weight: 600;
}

.megastar-seller-search {
	position: relative;
	margin-top: 10px;
}

.megastar-seller-search label {
	display: block;
	margin: 0 0 4px;
	color: var(--megastar-seller-muted);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.megastar-seller-search input,
.megastar-seller-party-fields input,
.megastar-seller-party-fields textarea,
.megastar-seller-summary input {
	width: 100%;
	min-height: 36px;
	padding: 6px 8px;
	border: 1px solid var(--megastar-seller-input-border);
	border-radius: 7px;
	background: var(--megastar-seller-card);
	color: var(--megastar-seller-text);
	font: 12px/1.3 Arial, sans-serif;
}

.megastar-seller-search input::placeholder,
.megastar-seller-party-fields input::placeholder,
.megastar-seller-party-fields textarea::placeholder {
	color: #7f8998;
}

.megastar-seller-party-fields {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 6px;
	margin: 0;
	padding: 0 8px 8px;
}

.megastar-seller-party-fields label {
	display: grid;
	gap: 3px;
	margin: 0;
	color: var(--megastar-seller-muted);
	font-size: 10px;
}

.megastar-seller-party-fields .megastar-seller-field-wide {
	grid-column: 1 / -1;
}

.megastar-quote-modal[hidden] {
	display: none !important;
}

.megastar-quote-modal {
	position: fixed;
	z-index: 999999;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 18px;
}

.megastar-quote-modal-backdrop {
	position: absolute;
	inset: 0;
	border: 0;
	background: rgba(0, 0, 0, 0.55);
	cursor: pointer;
}

.megastar-quote-modal-card {
	position: relative;
	z-index: 1;
	display: flex;
	width: min(1100px, calc(100vw - 32px));
	max-height: 85vh;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid #2d3649;
	border-radius: 18px;
	background: #111722;
	color: var(--megastar-seller-text);
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.megastar-quote-modal-card header {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px;
	border-bottom: 1px solid var(--megastar-seller-border);
	background: #151c29;
}

.megastar-quote-modal-card h2,
.megastar-quote-modal-card p {
	margin: 0;
}

.megastar-quote-modal-kicker {
	color: var(--megastar-seller-muted);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.megastar-quote-modal-close {
	width: 40px;
	height: 40px;
	border: 1px solid #3a455b;
	border-radius: 50%;
	background: #222c3e;
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.megastar-seller-party-fields--modal {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 14px 16px;
	-webkit-overflow-scrolling: touch;
}

.megastar-seller-party-fields--modal input,
.megastar-seller-party-fields--modal select,
.megastar-seller-party-fields--modal textarea {
	min-height: 42px;
	font-size: 14px;
}

.megastar-invoice-line-editor {
	display: grid;
	gap: 8px;
	padding-top: 8px;
	border-top: 1px solid var(--megastar-seller-border);
}

.megastar-invoice-line-editor > strong {
	color: var(--megastar-seller-text);
	font-size: 13px;
}

.megastar-invoice-line-row {
	display: grid;
	grid-template-columns: 58px minmax(88px, 1fr) minmax(150px, 2fr) minmax(88px, 1fr) 92px 88px 135px 86px;
	gap: 6px;
	align-items: end;
	padding: 8px;
	border: 1px solid var(--megastar-seller-border);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.03);
}

.megastar-invoice-line-row label {
	min-width: 0;
}

.megastar-invoice-line-row input,
.megastar-invoice-line-row select {
	width: 100%;
}

.megastar-invoice-line-amount {
	display: block;
	padding: 10px 6px;
	border: 1px solid var(--megastar-seller-input-border);
	border-radius: 6px;
	background: #101722;
	color: var(--megastar-seller-text);
	text-align: right;
	font-size: 12px;
}

.megastar-client-order-review {
	display: grid;
	gap: 8px;
	padding-top: 8px;
	border-top: 1px solid var(--megastar-seller-border);
	color: var(--megastar-seller-text);
}

.megastar-client-order-table {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
	font-size: 11px;
}

.megastar-client-order-table th,
.megastar-client-order-table td {
	padding: 6px;
	border: 1px solid var(--megastar-seller-border);
	text-align: left;
	word-break: break-word;
}

.megastar-client-order-table input {
	width: 100%;
	min-height: 32px;
}

.megastar-client-order-total {
	margin: 0;
	text-align: right;
}

@media (max-width: 760px) {
	.megastar-invoice-line-row {
		grid-template-columns: 1fr 1fr;
	}

	.megastar-invoice-line-amount {
		grid-column: 1 / -1;
	}
}

.megastar-quote-modal-card footer {
	display: flex;
	flex: 0 0 auto;
	justify-content: flex-end;
	gap: 8px;
	padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
	border-top: 1px solid var(--megastar-seller-border);
	background: #151c29;
}

.megastar-quote-modal-card footer button {
	min-height: 40px;
	padding: 8px 14px;
	border-radius: 8px;
	font-weight: 800;
	cursor: pointer;
}

.megastar-quote-modal-save {
	border: 1px solid #26718d;
	background: #194e65;
	color: #fff;
}

.megastar-quote-modal-secondary {
	border: 1px solid #3a455b;
	background: #222c3e;
	color: var(--megastar-seller-text);
}

.megastar-search-results {
	position: absolute;
	z-index: 100;
	top: 100%;
	right: 0;
	left: 0;
	max-height: 300px;
	overflow: auto;
	border: 1px solid var(--megastar-seller-input-border);
	border-radius: 7px;
	background: var(--megastar-seller-card);
	box-shadow: 0 12px 24px rgba(0, 0, 0, 0.42);
}

.megastar-search-result {
	display: flex;
	width: 100%;
	justify-content: space-between;
	gap: 8px;
	padding: 9px;
	border: 0;
	border-bottom: 1px solid var(--megastar-seller-border);
	background: var(--megastar-seller-card);
	color: var(--megastar-seller-text);
	text-align: left;
	cursor: pointer;
}

.megastar-search-result:hover,
.megastar-search-result:focus {
	background: #263147;
}

.megastar-search-empty,
.megastar-cart-empty {
	margin: 0;
	padding: 18px;
	border: 1px dashed #384255;
	border-radius: 10px;
	color: var(--megastar-seller-muted);
	font-size: 13px;
	text-align: center;
}

.megastar-seller-cart-items {
	flex: 1 1 auto;
	min-height: 260px;
	overflow: auto;
	padding: 10px;
	-webkit-overflow-scrolling: touch;
}

.megastar-cart-line {
	display: grid;
	grid-template-columns: 58px minmax(0, 1fr);
	gap: 10px;
	padding: 10px;
	margin-bottom: 9px;
	border: 1px solid var(--megastar-seller-card-border);
	border-radius: 10px;
	background: var(--megastar-seller-card);
}

.megastar-cart-thumb {
	display: grid;
	width: 58px;
	height: 58px;
	place-items: center;
	overflow: hidden;
	border: 1px solid var(--megastar-seller-input-border);
	border-radius: 7px;
	background: #fff;
}

.megastar-cart-thumb img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.megastar-cart-content h3 {
	margin: 0 0 4px;
	color: #fff;
	font-size: 13px;
	font-weight: 800;
	line-height: 1.25;
}

.megastar-cart-sku {
	margin: 0 0 8px;
	color: var(--megastar-seller-muted);
	font-size: 11px;
	font-weight: 700;
	line-height: 1.35;
}

.megastar-cart-pricing {
	display: grid;
	gap: 3px;
	margin: 0 0 9px;
	font-size: 11px;
}

.megastar-cart-pricing div {
	display: flex;
	justify-content: space-between;
	gap: 8px;
}

.megastar-cart-pricing dt,
.megastar-cart-pricing dd {
	margin: 0;
}

.megastar-cart-pricing dt {
	color: var(--megastar-seller-muted);
}

.megastar-cart-pricing dd {
	color: var(--megastar-seller-text);
	font-weight: 700;
	text-align: right;
}

.megastar-cart-controls {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	align-items: center;
}

.megastar-cart-quantity,
.megastar-cart-line-total {
	display: grid;
	gap: 4px;
}

.megastar-cart-control-label {
	color: var(--megastar-seller-muted);
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.megastar-cart-quantity-buttons {
	display: grid;
	grid-template-columns: 40px minmax(52px, 1fr) 40px;
	gap: 5px;
}

.megastar-cart-quantity-buttons button,
.megastar-cart-quantity-buttons input {
	width: 100%;
	min-height: 40px;
	padding: 3px;
	border: 1px solid var(--megastar-seller-input-border);
	border-radius: 7px;
	background: var(--megastar-seller-panel);
	color: var(--megastar-seller-text);
	font: 700 15px/1 Arial, sans-serif;
	text-align: center;
}

.megastar-cart-quantity-buttons button {
	border-color: #3a455b;
	background: #222c3e;
	color: #fff;
	cursor: pointer;
}

.megastar-cart-quantity-buttons button:hover,
.megastar-cart-quantity-buttons button:focus {
	border-color: var(--megastar-seller-accent);
	background: #194e65;
}

.megastar-line-subtotals {
	display: grid;
	gap: 4px;
	margin: 10px 0 0;
	padding-top: 8px;
	border-top: 1px solid var(--megastar-seller-border);
	font-size: 11px;
}

.megastar-line-subtotals div {
	display: flex;
	justify-content: space-between;
	gap: 8px;
}

.megastar-line-subtotals dt,
.megastar-line-subtotals dd {
	margin: 0;
}

.megastar-line-subtotals dt {
	color: var(--megastar-seller-muted);
}

.megastar-line-subtotals dd {
	color: var(--megastar-seller-text);
	font-weight: 700;
	text-align: right;
}

.megastar-line-subtotals div:last-child {
	padding-top: 4px;
	border-top: 1px solid var(--megastar-seller-border);
	color: #fff;
	font-size: 13px;
}

.megastar-cart-remove {
	margin-top: 8px;
	padding: 6px 9px;
	border: 1px solid #6b3035;
	border-radius: 6px;
	background: #2f1d24;
	color: #ffb4b4;
	font-size: 11px;
	cursor: pointer;
}

.megastar-seller-cart-foot {
	flex: 0 0 auto;
	position: sticky;
	bottom: 0;
	z-index: 6;
	padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
	border-top: 1px solid var(--megastar-seller-border);
	background: var(--megastar-seller-head);
	box-shadow: 0 -12px 24px rgba(0, 0, 0, 0.24);
}

.megastar-seller-summary {
	display: grid;
	grid-template-columns: 1fr;
	gap: 5px 12px;
	color: var(--megastar-seller-muted);
	font-size: 11px;
}

.megastar-seller-summary > div,
.megastar-seller-summary > label {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin: 0;
}

.megastar-seller-summary strong {
	color: #fff;
}

.megastar-seller-summary input {
	width: 92px;
	min-height: 32px;
	text-align: right;
}

.megastar-seller-total {
	display: flex;
	justify-content: space-between;
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px solid var(--megastar-seller-border);
	color: #fff;
	font-size: 18px;
	font-weight: 900;
}

.megastar-clear-cart {
	border-color: #6b3035 !important;
	background: #2f1d24 !important;
	color: #ffb4b4 !important;
}

.megastar-seller-cart-actions {
	display: grid;
	grid-template-columns: 1fr;
	gap: 6px;
	margin-top: 10px;
}

.megastar-seller-cart-actions button {
	min-height: 40px;
	padding: 8px 6px;
	border: 1px solid #3a455b;
	border-radius: 7px;
	background: #1a2130;
	color: var(--megastar-seller-text);
	font: 600 12px/1.2 Arial, sans-serif;
	cursor: pointer;
}

.megastar-seller-cart-actions .megastar-primary-action {
	grid-column: 1 / -1;
	border-color: #26718d;
	background: #194e65;
	color: #bff4ff;
}

.megastar-product-hotspot {
	position: absolute;
	z-index: 2000000;
	display: flex;
	align-items: flex-start;
	justify-content: flex-end;
	padding: 2px;
	border: 1px solid transparent !important;
	border-radius: 3px !important;
	background: transparent !important;
	box-shadow: none !important;
	pointer-events: auto;
	touch-action: manipulation;
}

.megastar-add-button {
	position: absolute !important;
	top: 3px !important;
	right: 3px !important;
	display: none !important;
	width: auto !important;
	min-width: 0 !important;
	max-width: 86px !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 4px 7px !important;
	border: 1px solid rgba(23, 74, 126, 0.8) !important;
	border-radius: 4px !important;
	background: rgba(255, 255, 255, 0.96) !important;
	background-image: none !important;
	box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18) !important;
	color: #174a7e !important;
	font: 700 10px/1.2 Arial, sans-serif !important;
	letter-spacing: 0 !important;
	text-align: center !important;
	text-decoration: none !important;
	text-transform: none !important;
	white-space: nowrap !important;
	cursor: pointer;
}

.megastar-product-hotspot:hover,
.megastar-product-hotspot:focus-within {
	border-color: rgba(23, 74, 126, 0.42) !important;
	background: rgba(23, 74, 126, 0.025) !important;
	box-shadow: inset 0 0 0 1px rgba(23, 74, 126, 0.08) !important;
}

.megastar-product-hotspot:hover .megastar-add-button,
.megastar-product-hotspot:focus-within .megastar-add-button,
.megastar-add-button:focus {
	display: block !important;
}

.megastar-add-button:hover,
.megastar-add-button:focus {
	background: #174a7e !important;
	color: #fff !important;
}

.megastar-client-workspace {
	--megastar-client-bg: #f3f6f9;
	--megastar-client-panel: #ffffff;
	--megastar-client-border: #d6dee8;
	--megastar-client-text: #172033;
	--megastar-client-muted: #5f6b7a;
	--megastar-client-accent: #174a7e;
	color: var(--megastar-client-text);
}

.megastar-client-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin: 0 0 12px;
	padding: 10px 12px;
	border: 1px solid var(--megastar-client-border);
	border-radius: 8px;
	background: #ffffff;
}

.megastar-client-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
}

.megastar-client-actions button {
	min-height: 38px;
	padding: 7px 11px;
	border: 1px solid var(--megastar-client-accent);
	border-radius: 7px;
	background: #174a7e;
	color: #ffffff;
	font: 700 12px/1.2 Arial, sans-serif;
	cursor: pointer;
}

.megastar-client-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) clamp(340px, 32vw, 470px);
	gap: 16px;
	align-items: start;
	padding: 12px;
	border-radius: 10px;
	background: var(--megastar-client-bg);
}

.megastar-client-catalog {
	min-width: 0;
}

.megastar-client-panel {
	position: sticky;
	top: 18px;
	max-height: calc(100vh - 36px);
	overflow: auto;
	padding: 14px;
	border: 1px solid var(--megastar-client-border);
	border-radius: 8px;
	background: var(--megastar-client-panel);
	box-shadow: 0 8px 24px rgba(23, 32, 51, 0.12);
}

.megastar-client-panel h2 {
	margin: 0 0 10px;
	font-size: 18px;
	color: var(--megastar-client-accent);
}

.megastar-client-fields {
	display: grid;
	gap: 8px;
	margin-bottom: 12px;
}

.megastar-client-fields label,
.megastar-client-summary label {
	display: grid;
	gap: 4px;
	font: 700 12px/1.2 Arial, sans-serif;
	color: var(--megastar-client-muted);
}

.megastar-client-fields input,
.megastar-client-fields textarea,
.megastar-client-summary input {
	width: 100%;
	border: 1px solid var(--megastar-client-border);
	border-radius: 6px;
	padding: 8px;
	color: var(--megastar-client-text);
	background: #fff;
	font: 400 14px/1.35 Arial, sans-serif;
}

.megastar-client-cart {
	display: grid;
	gap: 8px;
	margin: 12px 0;
}

.megastar-client-cart-line {
	display: grid;
	grid-template-columns: 72px minmax(0, 1fr);
	gap: 10px;
	padding: 8px;
	border: 1px solid var(--megastar-client-border);
	border-radius: 8px;
	background: #fbfcfe;
}

.megastar-client-summary {
	display: grid;
	gap: 7px;
	padding-top: 10px;
	border-top: 1px solid var(--megastar-client-border);
}

.megastar-client-summary p {
	display: flex;
	justify-content: space-between;
	margin: 0;
}

.megastar-client-total {
	font-size: 18px;
	color: var(--megastar-client-accent);
}

@media (max-width: 1100px) {
	.megastar-client-layout {
		grid-template-columns: 1fr;
	}

	.megastar-client-panel {
		position: static;
		max-height: none;
	}
}

.megastar-client-workspace .megastar-client-panel {
	background: var(--megastar-seller-panel);
	border-color: var(--megastar-seller-border);
	border-radius: 14px;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.34);
	color: var(--megastar-seller-text);
}

.megastar-client-workspace .megastar-client-panel h2 {
	color: var(--megastar-seller-text);
}

.megastar-client-workspace .megastar-client-cart-line {
	display: grid;
	grid-template-columns: 74px minmax(0, 1fr);
	gap: 10px;
	padding: 9px;
	border-color: var(--megastar-seller-border);
	background: #111827;
}

.megastar-product-sheet[hidden] {
	display: none !important;
}

.megastar-product-sheet {
	position: fixed;
	z-index: 999999;
	inset: 0;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding: 18px;
}

.megastar-product-sheet-backdrop {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: rgba(15, 23, 42, 0.42);
	box-shadow: none;
}

.megastar-product-sheet-card {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: 120px minmax(0, 1fr);
	gap: 16px;
	width: min(520px, 100%);
	max-height: min(82vh, 620px);
	overflow: auto;
	padding: 20px;
	border: 1px solid #dfe5ec;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 18px 42px rgba(15, 23, 42, 0.28);
}

.megastar-product-sheet-card > img {
	width: 120px;
	height: 120px;
	object-fit: contain;
	border: 1px solid #dfe5ec;
	border-radius: 7px;
	background: #fff;
}

.megastar-product-sheet-card h2 {
	margin: 3px 36px 10px 0;
	font-size: 1.2rem;
}

.megastar-product-sheet-card p {
	margin: 0;
	color: #64748b;
	font-weight: 700;
}

.megastar-product-sheet-card dl {
	display: grid;
	gap: 5px;
	margin: 0 0 14px;
}

.megastar-product-sheet-card dl div {
	display: flex;
	justify-content: space-between;
	gap: 10px;
}

.megastar-product-sheet-card dt,
.megastar-product-sheet-card dd {
	margin: 0;
}

.megastar-product-sheet-card dd {
	font-weight: 700;
}

.megastar-product-sheet-close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid #cbd3dc;
	border-radius: 50%;
	background: #fff;
	color: #172033;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}

.megastar-product-sheet-actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}

.megastar-product-sheet-actions .megastar-product-sheet-default {
	grid-column: 1 / -1;
}

.megastar-product-sheet-actions button {
	min-height: 46px;
	padding: 9px 12px;
	border: 1px solid #174a7e;
	border-radius: 6px;
	background: #174a7e;
	color: #fff;
	font: 700 14px/1.2 Arial, sans-serif;
	cursor: pointer;
}

body.megastar-sheet-open {
	overflow: hidden;
}

.megastar-quote-print {
	display: none;
	font-family: Arial, sans-serif;
	color: #111;
}

.megastar-quote-print header,
.megastar-quote-parties {
	display: flex;
	justify-content: space-between;
	gap: 24px;
}

.megastar-quote-print header {
	padding-bottom: 12px;
	border-bottom: 2px solid #111;
}

.megastar-quote-print h1,
.megastar-quote-print h2,
.megastar-quote-print p {
	margin-top: 0;
}

.megastar-quote-parties {
	margin: 18px 0;
}

.megastar-quote-parties > div {
	width: 50%;
}

.megastar-quote-parties p,
.megastar-quote-notes p {
	white-space: pre-line;
}

.megastar-quote-print table {
	width: 100%;
	border-collapse: collapse;
	font-size: 12px;
}

.megastar-quote-print th,
.megastar-quote-print td {
	padding: 7px;
	border: 1px solid #777;
	text-align: left;
}

.megastar-quote-summary {
	width: min(320px, 100%);
	margin: 16px 0 16px auto;
}

.megastar-quote-summary p {
	display: flex;
	justify-content: space-between;
	margin: 0;
	padding: 5px 0;
	border-bottom: 1px solid #ddd;
}

@media (max-width: 1100px) {
	.megastar-seller-layout {
		grid-template-columns: 1fr;
		gap: 0;
		padding: 10px;
	}

	.megastar-seller-panel {
		position: static;
		max-height: none;
		min-height: 0;
		margin-top: 14px;
	}

	.megastar-seller-cart-items {
		max-height: 42vh;
	}

	.megastar-visual-catalog--seller .megastar-visual-header {
		position: sticky;
		top: 0;
		z-index: 10;
	}
}

@media (min-width: 768px) and (max-width: 1100px) and (orientation: landscape) {
	.megastar-seller-panel {
		display: flex;
		flex-direction: column;
		max-height: calc(100vh - 24px);
		overflow: hidden;
	}

	.megastar-seller-cart-head,
	.megastar-seller-cart-foot {
		flex: 0 0 auto;
	}

	.megastar-seller-cart-items {
		flex: 1 1 auto;
		min-height: 130px;
		max-height: none;
		overflow: auto;
	}

	.megastar-seller-summary {
		gap: 4px 10px;
	}

	.megastar-seller-total {
		margin-top: 8px;
		padding-top: 8px;
		font-size: 16px;
	}

	.megastar-seller-cart-actions button {
		min-height: 38px;
	}
}

@media (hover: none) {
	.megastar-product-hotspot:hover,
	.megastar-product-hotspot:focus-within {
		border-color: transparent !important;
		background: transparent !important;
		box-shadow: none !important;
	}

	.megastar-add-button {
		display: none !important;
	}

	.megastar-add-button::before {
		content: "";
	}
}

@media (max-width: 600px) {
	.megastar-cart-line {
		grid-template-columns: 48px minmax(0, 1fr);
	}

	.megastar-cart-thumb {
		width: 48px;
		height: 48px;
	}

	.megastar-cart-controls,
	.megastar-seller-cart-actions,
	.megastar-seller-party-fields,
	.megastar-seller-summary {
		grid-template-columns: 1fr;
	}

	.megastar-seller-party-fields .megastar-seller-field-wide,
	.megastar-seller-cart-actions .megastar-primary-action {
		grid-column: auto;
	}

	.megastar-product-sheet-card {
		grid-template-columns: 72px minmax(0, 1fr);
		padding: 16px;
		border-radius: 14px 14px 0 0;
	}

	.megastar-product-sheet-card > img {
		width: 72px;
		height: 72px;
	}

	.megastar-product-sheet-actions {
		grid-column: 1 / -1;
	}
}

@media print {
	@page {
		size: letter portrait;
		margin: 0;
	}

	.megastar-product-hotspot,
	.megastar-add-button,
	.megastar-seller-panel,
	.megastar-seller-toolbar,
	.megastar-seller-print-actions,
	.megastar-product-sheet,
	.megastar-quote-modal,
	.megastar-visual-controls,
	iframe,
	[class*="whatsapp"],
	[id*="whatsapp"],
	[class*="translate"],
	[id*="translate"],
	[class*="language"],
	[id*="language"] {
		display: none !important;
	}

	body.megastar-print-active * {
		visibility: hidden !important;
	}

	body.megastar-print-active .megastar-seller-workspace,
	body.megastar-print-active .megastar-seller-workspace * {
		visibility: visible !important;
	}

	body.megastar-print-active .megastar-seller-workspace {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		max-width: none;
		margin: 0;
	}

	body.megastar-print-active .megastar-no-print,
	body.megastar-print-active .megastar-product-hotspot,
	body.megastar-print-active .megastar-add-button,
	body.megastar-print-active .megastar-seller-panel,
	body.megastar-print-active .megastar-seller-toolbar,
	body.megastar-print-active .megastar-quote-modal,
	body.megastar-print-active .megastar-visual-header,
	body.megastar-print-active .megastar-page-meta {
		display: none !important;
	}

	body.megastar-print-catalog-all .megastar-seller-catalog,
	body.megastar-print-current-page .megastar-seller-catalog {
		display: block !important;
	}

	body.megastar-print-catalog-all .megastar-visual-stage,
	body.megastar-print-current-page .megastar-visual-stage {
		padding: 0;
		background: #fff;
	}

	body.megastar-print-catalog-all .megastar-page-slide {
		display: block !important;
		break-after: page;
		page-break-after: always;
	}

	body.megastar-print-current-page .megastar-page-slide {
		display: none !important;
	}

	body.megastar-print-current-page .megastar-page-slide.is-active {
		display: block !important;
	}

	body.megastar-print-catalog-all .megastar-page-viewport,
	body.megastar-print-current-page .megastar-page-viewport {
		overflow: visible;
	}

	body.megastar-print-catalog-all .megastar-page-scale,
	body.megastar-print-current-page .megastar-page-scale {
		width: 8.5in !important;
		height: 11in !important;
		margin: 0;
	}

	body.megastar-print-catalog-all .megastar-rendered-page,
	body.megastar-print-current-page .megastar-rendered-page {
		box-shadow: none;
		transform: scale(var(--megastar-print-scale)) !important;
		transform-origin: top left;
	}

	body.megastar-print-catalog-all .megastar-quote-print,
	body.megastar-print-current-page .megastar-quote-print {
		display: none !important;
	}

	body.megastar-print-quote .megastar-seller-layout,
	body.megastar-print-quote .megastar-seller-toolbar {
		display: none !important;
	}

	body.megastar-print-quote .megastar-quote-print,
	body.megastar-print-quote .megastar-quote-print * {
		visibility: visible !important;
	}

	body.megastar-print-quote .megastar-quote-print {
		display: block !important;
		padding: 0.45in;
	}
}

/* v0.4.1 hard overrides for cached tablet styles and third-party widgets. */
.megastar-seller-workspace .megastar-product-sheet,
.megastar-seller-workspace .megastar-seller-product-modal,
.megastar-seller-workspace .megastar-seller-touch-modal,
.megastar-seller-workspace .megastar-mobile-product-sheet {
	background: transparent !important;
}

.megastar-seller-workspace .megastar-product-sheet-backdrop {
	background: rgba(0, 0, 0, 0.45) !important;
	box-shadow: none !important;
}

.megastar-seller-workspace .megastar-product-sheet-card,
.megastar-seller-workspace .megastar-seller-product-modal .megastar-product-sheet-card,
.megastar-seller-workspace .megastar-seller-touch-modal .megastar-product-sheet-card,
.megastar-seller-workspace .megastar-mobile-product-sheet .megastar-product-sheet-card {
	position: relative !important;
	width: calc(100% - 32px) !important;
	max-width: 520px !important;
	max-height: min(82vh, 620px) !important;
	margin: 0 auto !important;
	padding: 18px !important;
	border-radius: 18px !important;
	background: #ffffff !important;
	color: #111827 !important;
	box-shadow: 0 18px 46px rgba(0, 0, 0, 0.28) !important;
}

.megastar-seller-workspace .megastar-product-sheet-actions .megastar-product-sheet-default {
	min-height: 48px !important;
	background: #174a7e !important;
	color: #ffffff !important;
	font-size: 15px !important;
}

.megastar-seller-workspace [class*="whatsapp"],
.megastar-seller-workspace [id*="whatsapp"],
.megastar-seller-workspace [class*="translate"],
.megastar-seller-workspace [id*="translate"],
.megastar-seller-workspace [class*="language"],
.megastar-seller-workspace [id*="language"] {
	display: none !important;
}

@media (hover: none), (pointer: coarse), (max-width: 1100px) {
	.megastar-seller-workspace .megastar-product-hotspot {
		background: transparent !important;
		border: 0 !important;
		box-shadow: none !important;
		opacity: 1 !important;
		visibility: visible !important;
		pointer-events: auto !important;
	}

	.megastar-seller-workspace .megastar-product-hotspot .megastar-add-button,
	.megastar-seller-workspace .megastar-add-button,
	.megastar-seller-workspace .megastar-seller-add-button {
		display: block !important;
		opacity: 0 !important;
		visibility: hidden !important;
		pointer-events: none !important;
		width: 1px !important;
		height: 1px !important;
		min-width: 0 !important;
		min-height: 0 !important;
		padding: 0 !important;
		border: 0 !important;
		background: transparent !important;
		box-shadow: none !important;
		color: transparent !important;
		font-size: 0 !important;
	}

	.megastar-product-sheet {
		align-items: flex-end !important;
		background: transparent !important;
	}
}

@media print {
	.megastar-seller-version-badge,
	.megastar-seller-workspace .megastar-product-hotspot,
	.megastar-seller-workspace .megastar-add-button,
	.megastar-seller-workspace .megastar-seller-add-button,
	.megastar-seller-workspace .megastar-product-sheet,
	.megastar-seller-workspace [class*="whatsapp"],
	.megastar-seller-workspace [id*="whatsapp"],
	.megastar-seller-workspace [class*="translate"],
	.megastar-seller-workspace [id*="translate"],
	.megastar-seller-workspace [class*="language"],
	.megastar-seller-workspace [id*="language"],
	iframe {
		display: none !important;
		visibility: hidden !important;
	}
}

/* v0.4.1 desktop quote modal repair: keep this global because the modal is outside
   the visual page stack and must override stale desktop modal styles from cache. */
body.megastar-quote-modal-open {
	overflow: hidden !important;
}

.megastar-quote-modal[hidden],
[data-seller-quote-modal][hidden] {
	display: none !important;
}

.megastar-quote-modal,
[data-seller-quote-modal] {
	position: fixed !important;
	inset: 0 !important;
	z-index: 2147483000 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: auto !important;
	height: auto !important;
	min-width: 0 !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 24px !important;
	overflow: hidden !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
}

.megastar-quote-modal::before,
.megastar-quote-modal::after,
[data-seller-quote-modal]::before,
[data-seller-quote-modal]::after {
	content: none !important;
	display: none !important;
	background: transparent !important;
}

.megastar-quote-modal-backdrop,
[data-seller-quote-modal] .megastar-quote-modal-backdrop {
	position: absolute !important;
	inset: 0 !important;
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: rgba(0, 0, 0, 0.45) !important;
	box-shadow: none !important;
	cursor: pointer !important;
}

.megastar-quote-modal-card,
[data-seller-quote-modal] .megastar-quote-modal-card {
	position: relative !important;
	z-index: 1 !important;
	display: flex !important;
	width: calc(100% - 48px) !important;
	max-width: 1100px !important;
	max-height: 85vh !important;
	flex-direction: column !important;
	overflow: hidden !important;
	margin: 0 auto !important;
	border: 1px solid #2d3649 !important;
	border-radius: 18px !important;
	background: #111722 !important;
	color: #e8eef7 !important;
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45) !important;
}

.megastar-quote-modal-card header,
[data-seller-quote-modal] .megastar-quote-modal-card header {
	flex: 0 0 auto !important;
	background: #151c29 !important;
	color: #ffffff !important;
}

.megastar-seller-party-fields--modal,
[data-seller-quote-modal] .megastar-seller-party-fields--modal {
	flex: 1 1 auto !important;
	overflow-y: auto !important;
	-webkit-overflow-scrolling: touch !important;
	background: #111722 !important;
}

.megastar-quote-modal-card footer,
[data-seller-quote-modal] .megastar-quote-modal-card footer {
	flex: 0 0 auto !important;
	background: #151c29 !important;
}

@media (max-width: 1100px) {
	.megastar-quote-modal,
	[data-seller-quote-modal] {
		align-items: center !important;
		padding: 18px !important;
	}

	.megastar-quote-modal-card,
	[data-seller-quote-modal] .megastar-quote-modal-card {
		width: calc(100% - 32px) !important;
		max-height: 85vh !important;
	}
}

/* v0.5.5 mobile/tablet modal action repair, hard cache marker and iPad Safari print fix. */
@media (max-width: 768px) {
	body.megastar-quote-modal-open {
		overflow: hidden !important;
	}

	.megastar-quote-modal,
	[data-seller-quote-modal],
	.megastar-client-modal {
		position: fixed !important;
		inset: 0 !important;
		display: flex !important;
		width: 100vw !important;
		max-width: 100vw !important;
		height: 100dvh !important;
		max-height: 100dvh !important;
		align-items: stretch !important;
		justify-content: stretch !important;
		padding: 0 !important;
		overflow: hidden !important;
		touch-action: manipulation !important;
	}

	.megastar-quote-modal-card,
	[data-seller-quote-modal] .megastar-quote-modal-card,
	.megastar-client-modal .megastar-quote-modal-card {
		display: flex !important;
		width: 100vw !important;
		max-width: 100vw !important;
		height: 100dvh !important;
		max-height: 100dvh !important;
		min-height: 100dvh !important;
		flex-direction: column !important;
		margin: 0 !important;
		overflow: hidden !important;
		border: 0 !important;
		border-radius: 0 !important;
		background: #111722 !important;
	}

	.megastar-quote-modal-card header,
	[data-seller-quote-modal] .megastar-quote-modal-card header,
	.megastar-client-modal .megastar-quote-modal-card header {
		flex: 0 0 auto !important;
		padding: 10px !important;
	}

	.megastar-seller-party-fields--modal,
	[data-seller-quote-modal] .megastar-seller-party-fields--modal,
	.megastar-client-modal .megastar-seller-party-fields--modal {
		flex: 1 1 auto !important;
		min-height: 0 !important;
		overflow: auto !important;
		padding: 10px !important;
		-webkit-overflow-scrolling: touch !important;
	}

	.megastar-quote-modal-card footer,
	[data-seller-quote-modal] .megastar-quote-modal-card footer,
	.megastar-client-modal .megastar-quote-modal-card footer {
		position: sticky !important;
		right: 0 !important;
		bottom: 0 !important;
		left: 0 !important;
		z-index: 2147483001 !important;
		display: grid !important;
		grid-template-columns: 1fr !important;
		gap: 8px !important;
		flex: 0 0 auto !important;
		width: 100% !important;
		padding: 10px !important;
		padding-bottom: calc(10px + env(safe-area-inset-bottom)) !important;
		border-top: 1px solid #ddd !important;
		background: #fff !important;
	}

	.megastar-quote-modal-card footer button,
	[data-seller-quote-modal] .megastar-quote-modal-card footer button,
	.megastar-client-modal .megastar-quote-modal-card footer button {
		width: 100% !important;
		min-height: 44px !important;
		font-size: 16px !important;
		line-height: 1.2 !important;
		touch-action: manipulation !important;
	}

	.megastar-invoice-line-editor,
	.megastar-client-order-review {
		overflow-x: auto !important;
		-webkit-overflow-scrolling: touch !important;
	}
}

@media (min-width: 769px) and (max-width: 1024px) {
	.megastar-quote-modal,
	[data-seller-quote-modal],
	.megastar-client-modal {
		align-items: center !important;
		padding: 14px !important;
		overflow: hidden !important;
	}

	.megastar-quote-modal-card,
	[data-seller-quote-modal] .megastar-quote-modal-card,
	.megastar-client-modal .megastar-quote-modal-card {
		width: min(100vw - 28px, 980px) !important;
		max-width: calc(100vw - 28px) !important;
		max-height: 95vh !important;
		overflow: hidden !important;
	}

	.megastar-seller-party-fields--modal,
	[data-seller-quote-modal] .megastar-seller-party-fields--modal,
	.megastar-client-modal .megastar-seller-party-fields--modal {
		flex: 1 1 auto !important;
		min-height: 0 !important;
		overflow: auto !important;
		-webkit-overflow-scrolling: touch !important;
	}

	.megastar-quote-modal-card footer,
	[data-seller-quote-modal] .megastar-quote-modal-card footer,
	.megastar-client-modal .megastar-quote-modal-card footer {
		position: sticky !important;
		bottom: 0 !important;
		z-index: 2147483001 !important;
		display: grid !important;
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 8px !important;
		padding: 10px !important;
		padding-bottom: calc(10px + env(safe-area-inset-bottom)) !important;
		border-top: 1px solid #ddd !important;
		background: #fff !important;
	}

	.megastar-quote-modal-card footer button,
	[data-seller-quote-modal] .megastar-quote-modal-card footer button,
	.megastar-client-modal .megastar-quote-modal-card footer button {
		width: 100% !important;
		min-height: 44px !important;
		font-size: 16px !important;
		touch-action: manipulation !important;
	}
}

/* ============================================ */
/* v0.8.3 — Fix táctil iPad Safari              */
/* Habilita respuesta consistente al tap en     */
/* botones +/- y eliminar del carrito lateral.  */
/* ============================================ */

.megastar-cart-quantity-buttons button,
.megastar-cart-quantity-buttons input,
.megastar-cart-line button,
.megastar-cart-remove,
.megastar-seller-cart-actions button,
.megastar-seller-print-actions button {
	touch-action: manipulation;
	-webkit-tap-highlight-color: rgba(0, 0, 0, 0.05);
	cursor: pointer;
}

/* ============================================ */
/* v0.8.3 — Fix layout tablet landscape         */
/* En Android/iPad landscape (~1024-1180px) el  */
/* carrito lateral (.megastar-seller-cart) se   */
/* salia del viewport. El grid real de 2        */
/* columnas es .megastar-seller-layout (no      */
/* .megastar-seller-workspace, que solo define   */
/* variables de color). Se fuerza a 1 columna   */
/* con el carrito debajo, scrolleable.          */
/* ============================================ */

@media (min-width: 761px) and (max-width: 1180px) and (orientation: landscape) {
	.megastar-seller-layout {
		grid-template-columns: 1fr !important;
	}

	.megastar-seller-cart {
		width: 100% !important;
		max-height: 40vh;
		overflow-y: auto;
	}
}
