/* ── Custom Product Photo – Frontend styles ──────────────────────────── */

.cpp-wrapper {
	margin: 0 0 20px;
}

.cpp-field-label {
	margin: 0 0 10px;
	font-size: 15px;
}
.cpp-required {
	color: #e2401c;
	margin-left: 3px;
	font-weight: bold;
}

/* ── Canvas preview (shared, above slots) ────────────────────────────── */

#cpp-canvas-wrap {
	margin-bottom: 14px;
}
.cpp-canvas {
	display: block;
	max-width: 100%;
	height: auto;
	border-radius: 6px;
	border: 1px solid #e0e2e5;
	background: #f6f7f7;
	image-rendering: auto;
}

/* ── Canvas processing overlay ───────────────────────────────────────── */

#cpp-canvas-wrap {
	position: relative;
}

.cpp-canvas-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.3);
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10;
}

.cpp-canvas-overlay-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	padding: 24px 32px;
	background: rgba(255, 255, 255, 0.92);
	border-radius: 10px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
	max-width: 80%;
	text-align: center;
}

.cpp-canvas-overlay-text {
	font-size: 14px;
	font-weight: 500;
	color: #3c434a;
	line-height: 1.5;
}

/* ── Progress bar (canvas overlay) ───────────────────────────────────── */

.cpp-progress-bar {
	width: 100%;
	max-width: 260px;
	height: 8px;
	background: #e0e2e5;
	border-radius: 4px;
	overflow: hidden;
}

.cpp-progress-fill {
	width: 0%;
	height: 100%;
	border-radius: 4px;
	background: linear-gradient(90deg, #0073aa, #00a0d2);
	transition: width 0.5s ease;
}

.cpp-progress-text {
	font-size: 12px;
	color: #6b7280;
	min-height: 16px;
}

/* ── Zoom controls (lineart mode) ────────────────────────────────────── */

.cpp-zoom-controls {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 14px;
	padding: 8px 14px;
	background: #f9fafb;
	border: 1px solid #e0e2e5;
	border-radius: 6px;
}

.cpp-zoom-label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	font-weight: 500;
	color: #3c434a;
	cursor: pointer;
}

.cpp-zoom-controls input[type="range"] {
	-webkit-appearance: none;
	appearance: none;
	width: 140px;
	height: 6px;
	background: #d0d4d8;
	border-radius: 3px;
	outline: none;
	cursor: pointer;
}
.cpp-zoom-controls input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 22px;
	height: 22px;
	background: #0073aa;
	border: 2px solid #fff;
	border-radius: 50%;
	box-shadow: 0 1px 3px rgba(0,0,0,.2);
	cursor: pointer;
}
.cpp-zoom-controls input[type="range"]::-moz-range-thumb {
	width: 22px;
	height: 22px;
	background: #0073aa;
	border: 2px solid #fff;
	border-radius: 50%;
	box-shadow: 0 1px 3px rgba(0,0,0,.2);
	cursor: pointer;
}

#cpp-zoom-value {
	font-size: 13px;
	font-weight: 600;
	color: #1d2327;
	min-width: 40px;
}

.cpp-zoom-hint {
	font-size: 11px;
	color: #adb2b8;
	flex-basis: 100%;
}

@media (min-width: 480px) {
	.cpp-zoom-hint {
		flex-basis: auto;
		margin-left: auto;
	}
}

/* ── Color picker (lineart mode) ─────────────────────────────────────── */

.cpp-color-picker {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 14px;
	padding: 8px 14px;
	background: #f9fafb;
	border: 1px solid #e0e2e5;
	border-radius: 6px;
}

.cpp-color-picker-label {
	font-size: 13px;
	font-weight: 600;
	color: #3c434a;
	white-space: nowrap;
}

.cpp-color-swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.cpp-color-swatch {
	width: 28px;
	height: 28px;
	border-radius: 25%;
	border: 2px solid #d0d4d8;
	cursor: pointer;
	box-sizing: border-box;
	transition: border-color .15s, box-shadow .15s;
	position: relative;
}

.cpp-color-swatch:hover {
	border-color: #0073aa;
}

.cpp-color-swatch.active {
	border-color: #0073aa;
	box-shadow: 0 0 0 2px #0073aa, 0 0 0 4px #fff;
}

/* ── Font picker (embroidered_text mode) ─────────────────────────────── */

.cpp-font-picker {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 14px;
	padding: 8px 14px;
	background: #f9fafb;
	border: 1px solid #e0e2e5;
	border-radius: 6px;
}

.cpp-font-picker-label {
	font-size: 13px;
	font-weight: 600;
	color: #3c434a;
	white-space: nowrap;
}

.cpp-font-swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.cpp-font-swatch {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 80px;
	padding: 5px 12px;
	border: 2px solid #d0d4d8;
	border-radius: 6px;
	background: #fff;
	cursor: pointer;
	font-size: 14px;
	line-height: 1.4;
	color: #3c434a;
	transition: border-color .15s, box-shadow .15s;
	box-sizing: border-box;
}

.cpp-font-swatch:hover {
	border-color: #0073aa;
}

.cpp-font-swatch.active {
	border-color: #0073aa;
	box-shadow: 0 0 0 2px #0073aa, 0 0 0 4px #fff;
}

/* ── Embroidered text input wrap ────────────────────────────────────── */

.cpp-emb-text-wrap {
	position: relative;
}

.cpp-emb-text-input {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 9px 12px;
	font-size: 15px;
	font-family: inherit;
	color: #3c434a;
	border: 1px solid #c9cace;
	border-radius: 6px;
	background: #fafbfc;
	resize: vertical;
	min-height: 80px;
	line-height: 1.5;
	transition: border-color .15s, box-shadow .15s;
	outline: none;
}
.cpp-emb-text-input:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.15);
	background: #fff;
}
.cpp-emb-text-input::placeholder {
	color: #adb2b8;
}

/* ── Slot grid ───────────────────────────────────────────────────────── */

.cpp-slots {
	display: flex;
	flex-direction: column;
	gap: 16px;
	flex-wrap: wrap;
}

.cpp-slot {
	width: 100%;
	box-sizing: border-box;
}

.cpp-slot-heading {
	margin: 0 0 6px;
	font-size: 13px;
	font-weight: 600;
	color: #3c434a;
}

/* ── Optional extra slot (checkbox toggle) ───────────────────────────── */

.cpp-slot-opt-label {
	display: flex;
	align-items: center;
	gap: 9px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
	color: #3c434a;
	user-select: none;
	border: 1px solid #e0e2e5;
	border-radius: 6px;
	padding: 8px 12px;
	background: #f9fafb;
	width: 100%;
	box-sizing: border-box;
	transition: background .15s, border-color .15s;
}
.cpp-slot-opt-label:hover {
	background: #f0f7fc;
	border-color: #0073aa;
}
.cpp-slot-opt-label input[type="checkbox"] {
	width: 16px;
	height: 16px;
	cursor: pointer;
	flex-shrink: 0;
	accent-color: #0073aa;
}
.cpp-slot-opt-body {
	margin-top: 10px;
}

/* ── Slot price badge ────────────────────────────────────────────────── */

.cpp-slot-price {
	display: inline-block;
	margin-left: 8px;
	padding: 1px 7px;
	background: #fff8e1;
	border: 1px solid #f0c040;
	border-radius: 10px;
	color: #7a5c00;
	font-size: 12px;
	font-weight: 600;
	vertical-align: middle;
}

/* ── Extra checkbox option ───────────────────────────────────────────── */

.cpp-extra-chk-label,
.cpp-slot--extra-opt .cpp-extra-chk-label {
	display: flex;
	align-items: center;
	gap: 9px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
	color: #3c434a;
	user-select: none;
	border: 1px solid #e0e2e5;
	border-radius: 6px;
	padding: 8px 12px;
	background: #f9fafb;
	width: 100%;
	box-sizing: border-box;
	transition: background .15s, border-color .15s;
}
.cpp-extra-chk-label:hover {
	background: #fff8e1;
	border-color: #e07b00;
}
.cpp-extra-chk-label input[type="checkbox"] {
	width: 16px;
	height: 16px;
	cursor: pointer;
	flex-shrink: 0;
	accent-color: #e07b00;
}
.cpp-extra-chk-label input[type="checkbox"]:checked ~ span:first-of-type {
	color: #1d2327;
}

/* ── Text field slot ─────────────────────────────────────────────────── */

.cpp-text-field-label {
	display: block;
	margin-bottom: 6px;
	font-size: 13px;
	font-weight: 600;
	color: #3c434a;
}

.cpp-text-input {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 9px 12px;
	font-size: 13px;
	font-family: inherit;
	color: #3c434a;
	border: 1px solid #c9cace;
	border-radius: 6px;
	background: #fafbfc;
	resize: vertical;
	min-height: 80px;
	line-height: 1.5;
	transition: border-color .15s, box-shadow .15s;
	outline: none;
}
.cpp-text-input:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.15);
	background: #fff;
}
.cpp-text-input::placeholder {
	color: #adb2b8;
}

.cpp-text-char-count {
	display: block;
	margin-top: 4px;
	font-size: 11px;
	color: #adb2b8;
	text-align: right;
}

/* ── Active layer selector ────────────────────────────────────────────── */

.cpp-layer-selector {
	display: none;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
	padding: 8px 12px;
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
}
.cpp-layer-selector-label {
	font-size: 12px;
	font-weight: 600;
	color: #4b5563;
	white-space: nowrap;
}
.cpp-layer-icons {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
}

.cpp-layer-icon {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 4px 10px;
	font-size: 12px;
	color: #6b7280;
	background: transparent;
	border: 1px solid #d1d5db;
	border-radius: 20px;
	cursor: pointer;
	transition: all .15s;
	line-height: 1.2;
}
.cpp-layer-icon:hover {
	border-color: #9ca3af;
	color: #374151;
}
.cpp-layer-icon.active {
	color: #1d4ed8;
	border-color: #2271b1;
	background: rgba(34, 113, 177, 0.08);
}

/* Radio dot */
.cpp-layer-icon-dot {
	display: inline-block;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	border: 2px solid #c9cace;
	box-sizing: border-box;
	transition: all .15s;
	flex-shrink: 0;
}
.cpp-layer-icon.active .cpp-layer-icon-dot {
	border-color: #2271b1;
	background: #2271b1;
	box-shadow: inset 0 0 0 2px #fff;
}

.cpp-layer-icon-label {
	white-space: nowrap;
}

.cpp-slot--active-layer {
	border-left: 3px solid #2271b1;
	padding-left: 10px;
}

/* ── Upload zone ─────────────────────────────────────────────────────── */

.cpp-upload-zone {
	position: relative;
	border: 2px dashed #c9cace;
	border-radius: 8px;
	padding: 28px 20px;
	text-align: center;
	cursor: pointer;
	transition: border-color .18s, background .18s;
	background: #fafbfc;
	outline: none;
}
.cpp-upload-zone:hover,
.cpp-upload-zone:focus,
.cpp-upload-zone.cpp-drag-over {
	border-color: #0073aa;
	background: #f0f7fc;
}

/* Placeholder content */
.cpp-zone-placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 7px;
	pointer-events: none;
}
.cpp-upload-icon {
	width: 44px;
	height: 44px;
	stroke: #adb2b8;
	display: block;
}
.cpp-zone-text {
	font-size: 15px;
	font-weight: 500;
	color: #3c434a;
}
.cpp-zone-sub {
	font-size: 12px;
	color: #adb2b8;
}

/* Uploading state */
.cpp-zone-uploading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	font-size: 14px;
	color: #555d66;
}

/* Spinner */
.cpp-spinner {
	display: inline-block;
	width: 22px;
	height: 22px;
	border: 3px solid #d0d4d8;
	border-top-color: #0073aa;
	border-radius: 50%;
	animation: cpp-spin .7s linear infinite;
}
@keyframes cpp-spin {
	to { transform: rotate(360deg); }
}

/* ── Uploaded state (per slot) ───────────────────────────────────────── */

.cpp-uploaded-state {
	margin-top: 8px;
}

/* Info row */
.cpp-preview-info {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 4px;
	gap: 10px;
	flex-wrap: wrap;
}
.cpp-file-name {
	font-size: 12px;
	color: #8c8f94;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 200px;
}
.cpp-preview-actions {
	display: flex;
	gap: 8px;
}

/* ── Buttons ─────────────────────────────────────────────────────────── */

.cpp-btn {
	display: inline-flex;
	align-items: center;
	padding: 5px 13px;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	background: #fff;
	font-size: 13px;
	cursor: pointer;
	transition: background .15s, border-color .15s;
	line-height: 1.5;
}
.cpp-btn:hover {
	background: #f6f7f7;
}
.cpp-btn-secondary {
	border-color: #0073aa;
	color: #0073aa;
}
.cpp-btn-secondary:hover {
	background: #f0f7fc;
}
.cpp-btn-danger {
	border-color: #b32d2e;
	color: #b32d2e;
}
.cpp-btn-danger:hover {
	background: #fcf0f1;
}

/* ── Face cutout status ──────────────────────────────────────────────── */

.cpp-cutout-status {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 8px 0 4px;
	font-size: 12px;
	color: #555d66;
}
.cpp-spinner-sm {
	width: 14px;
	height: 14px;
	border-width: 2px;
}

/* ── WooCommerce Blocks cart: product details header ─────────────────── */

.wc-block-components-product-details::before {
	content: "Dodatkowe opcje";
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #3c434a;
	margin-bottom: 4px;
}


/* ── Summary price ──────────────────────────────────────────────────────────────── */

.cpp-price-summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 14px;
	padding: 10px 16px;
	background: #f0f7fc;
	border: 1px solid #b8d9ed;
	border-radius: 6px;
	font-size: 14px;
}

.cpp-price-summary-label {
	color: #3c434a;
	font-weight: 600;
}

.cpp-price-summary-amount {
	font-weight: 700;
	font-size: 17px;
	color: #1d2327;
}

/* ── Swatch slot ────────────────────────────────────────────────────── */

.cpp-swatch-label {
	display: block;
	margin-bottom: 8px;
	font-size: 13px;
	font-weight: 600;
	color: #3c434a;
}

.cpp-swatch-options {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.cpp-swatch-btn {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	padding: 10px 18px;
	border: 2px solid #d0d4d8;
	border-radius: 8px;
	background: #fff;
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
	color: #3c434a;
	transition: border-color .15s, background .15s, box-shadow .15s;
	min-width: 70px;
	text-align: center;
	line-height: 1.3;
}

.cpp-swatch-btn:hover {
	border-color: #059669;
	background: #ecfdf5;
}

.cpp-swatch-btn.active {
	border-color: #059669;
	background: #ecfdf5;
	box-shadow: 0 0 0 2px #059669, 0 0 0 4px #fff;
	color: #065f46;
}

.cpp-swatch-btn-label {
	font-weight: 600;
}

.cpp-swatch-price {
	font-size: 11px;
	color: #7a5c00;
	margin-top: 2px;
}

/* ── Choice slot ────────────────────────────────────────────────────── */

.cpp-choice-label {
	display: block;
	margin-bottom: 8px;
	font-size: 13px;
	font-weight: 600;
	color: #3c434a;
}

.cpp-choice-options {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.cpp-choice-btn {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	padding: 10px 18px;
	border: 2px solid #d0d4d8;
	border-radius: 8px;
	background: #fff;
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
	color: #3c434a;
	transition: border-color .15s, background .15s, box-shadow .15s;
	min-width: 70px;
	text-align: center;
	line-height: 1.3;
}

.cpp-choice-btn:hover {
	border-color: #10b981;
	background: #ecfdf5;
}

.cpp-choice-btn.active {
	border-color: #10b981;
	background: #ecfdf5;
	box-shadow: 0 0 0 2px #10b981, 0 0 0 4px #fff;
	color: #065f46;
}

.cpp-choice-btn-label {
	font-weight: 600;
}

.cpp-choice-price {
	font-size: 11px;
	color: #7a5c00;
	margin-top: 2px;
}

/* Choice image mode */
.cpp-choice--image .cpp-choice-btn {
	padding: 6px;
	min-width: 90px;
}

.cpp-choice--image .cpp-choice-btn img {
	width: 80px;
	height: 80px;
	object-fit: cover;
	border-radius: 4px;
	margin-bottom: 4px;
}

/* ── Multiplied slot copies ──────────────────────────────────────────── */

.cpp-multiplied {
	animation: cpp-fade-in .25s ease;
}

@keyframes cpp-fade-in {
	from { opacity: 0; transform: translateY(-6px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* ── Error message ───────────────────────────────────────────────────── */

.cpp-error {
	margin-top: 10px;
	padding: 9px 14px;
	background: #fcf0f1;
	border: 1px solid #f5a3a5;
	border-radius: 5px;
	color: #8a1f20;
	font-size: 13px;
	line-height: 1.5;
}

/* ── Scene Creator Modal ─────────────────────────────────────────────── */

.cpp-scene-open-btn {
	display: block;
	width: 100%;
	padding: 14px 20px;
	font-size: 16px;
	font-weight: 600;
	color: #fff;
	background: #e91e90;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.2s;
}
.cpp-scene-open-btn:hover {
	background: #d6006e;
}

.cpp-scene-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 999999;
	background: rgba(0, 0, 0, 0.6);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.cpp-scene-modal-inner {
	background: #fff;
	border-radius: 12px;
	width: 100%;
	max-width: 800px;
	max-height: 95vh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.cpp-scene-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 20px;
	border-bottom: 1px solid #e0e0e0;
	flex-shrink: 0;
}
.cpp-scene-modal-title {
	font-size: 16px;
	font-weight: 600;
}
.cpp-scene-modal-close {
	background: none;
	border: none;
	font-size: 24px;
	cursor: pointer;
	color: #666;
	line-height: 1;
	padding: 4px 8px;
}
.cpp-scene-modal-close:hover {
	color: #000;
}

.cpp-scene-modal-canvas-area {
	max-height: 50vh;
	overflow: hidden;
	background: #f5f5f5;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.cpp-scene-modal-canvas-area canvas {
	max-width: 100%;
	max-height: 50vh;
	display: block;
}

.cpp-scene-wizard {
	flex: 1;
	display: flex;
	flex-direction: column;
	overflow-y: auto;
	min-height: 0;
}

.cpp-scene-step-indicator {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 20px 4px;
	flex-shrink: 0;
}

.cpp-scene-step-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #ddd;
	transition: background 0.2s, transform 0.2s;
}
.cpp-scene-step-dot--active {
	background: #e91e90;
	transform: scale(1.3);
}
.cpp-scene-step-dot--done {
	background: #f48cc4;
}

.cpp-scene-step-content {
	flex: 1;
	padding: 16px 20px;
	overflow-y: auto;
}
.cpp-scene-step-content .cpp-scene-step-title {
	font-size: 15px;
	font-weight: 600;
	margin: 0 0 12px;
}
.cpp-scene-step-content .cpp-scene-step-hint {
	font-size: 13px;
	color: #666;
	margin-bottom: 12px;
}
/* Ensure moved elements display properly inside wizard */
.cpp-scene-step-content .cpp-slot {
	display: block !important;
	margin-bottom: 0;
}
.cpp-scene-step-content .cpp-color-picker,
.cpp-scene-step-content .cpp-font-picker {
	display: block !important;
}
.cpp-scene-step-content .cpp-zoom-controls {
	display: flex !important;
}
.cpp-scene-step-content .cpp-upload-zone {
	margin: 0;
}

.cpp-scene-wizard-nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 20px;
	border-top: 1px solid #e0e0e0;
	gap: 12px;
	flex-shrink: 0;
}
.cpp-scene-wizard-nav .cpp-btn {
	min-width: 100px;
}
.cpp-scene-wizard-nav .cpp-btn-primary,
.cpp-scene-wizard-nav .cpp-btn-secondary {
	background: #e91e90;
	color: #fff;
	border: 2px solid #c4177a;
	font-weight: 700;
	border-radius: 8px;
	padding: 10px 20px;
	font-size: 15px;
	cursor: pointer;
	transition: background 0.2s, border-color 0.2s;
	text-shadow: 0 1px 1px rgba(0,0,0,0.15);
}
.cpp-scene-wizard-nav .cpp-btn-primary:hover,
.cpp-scene-wizard-nav .cpp-btn-secondary:hover {
	background: #d6006e;
	border-color: #a8126a;
}

/* ── Cart preview lightbox ─────────────────────────────────────────── */
.cpp-lightbox-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.75);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1000000;
	cursor: zoom-out;
	animation: cppFadeIn 0.2s ease;
}
@keyframes cppFadeIn {
	from { opacity: 0; }
	to   { opacity: 1; }
}
.cpp-lightbox-overlay img {
	max-width: 90vw;
	max-height: 90vh;
	border-radius: 8px;
	box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

/* ── Scene creator: loading overlay ────────────────────────────────── */
.cpp-scene-loading-overlay {
	position: absolute;
	inset: 0;
	background: rgba(255, 255, 255, 0.92);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	z-index: 10;
	gap: 18px;
}
.cpp-scene-loading-overlay .cpp-scene-loading-text {
	font-size: 16px;
	font-weight: 600;
	color: #333;
}
.cpp-scene-loading-overlay .cpp-scene-loading-bar {
	width: 260px;
	max-width: 80%;
	height: 10px;
	background: #e0e0e0;
	border-radius: 5px;
	overflow: hidden;
}
.cpp-scene-loading-overlay .cpp-scene-loading-fill {
	height: 100%;
	width: 0%;
	background: #e91e90;
	border-radius: 5px;
	transition: width 0.4s ease;
}

/* ── "Added to cart" popup ────────────────────────────────────────── */
.cpp-added-popup-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1000000;
}
.cpp-added-popup {
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 8px 32px rgba(0,0,0,0.18);
	padding: 32px 28px 24px;
	text-align: center;
	max-width: 360px;
	width: 90%;
	animation: cppPopupIn 0.25s ease;
}
@keyframes cppPopupIn {
	from { transform: scale(0.9); opacity: 0; }
	to   { transform: scale(1);   opacity: 1; }
}
.cpp-added-popup-icon {
	font-size: 48px;
	line-height: 1;
	margin-bottom: 10px;
}
.cpp-added-popup-title {
	font-size: 18px;
	font-weight: 700;
	color: #222;
	margin-bottom: 20px;
}
.cpp-added-popup-actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.cpp-added-popup-actions a,
.cpp-added-popup-actions button {
	display: block;
	width: 100%;
	padding: 12px 0;
	font-size: 15px;
	font-weight: 600;
	border-radius: 8px;
	border: 2px solid #e91e90;
	cursor: pointer;
	text-decoration: none;
	text-align: center;
	transition: background 0.2s, color 0.2s;
	box-sizing: border-box;
}
.cpp-added-popup-actions .cpp-popup-btn-primary {
	background: #e91e90;
	color: #fff;
}
.cpp-added-popup-actions .cpp-popup-btn-primary:hover {
	background: #d4177f;
}
.cpp-added-popup-actions .cpp-popup-btn-secondary {
	background: #fff;
	color: #e91e90;
}
.cpp-added-popup-actions .cpp-popup-btn-secondary:hover {
	background: #fdf0f7;
}

/* ── Upsell section in popup ─────────────────────────────────────── */

.cpp-upsell-section {
	border: 2px dashed #e91e90;
	border-radius: 10px;
	padding: 14px;
	margin-bottom: 18px;
	background: #fdf0f7;
}
.cpp-upsell-header {
	font-size: 14px;
	font-weight: 700;
	color: #e91e90;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 10px;
	text-align: center;
}
.cpp-upsell-product {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
}
.cpp-upsell-img {
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: 6px;
	border: 1px solid #e0e2e5;
	flex-shrink: 0;
}
.cpp-upsell-info {
	flex: 1;
	text-align: left;
}
.cpp-upsell-name {
	font-size: 14px;
	font-weight: 600;
	color: #222;
	margin-bottom: 4px;
	line-height: 1.3;
}
.cpp-upsell-prices {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}
.cpp-upsell-original {
	font-size: 13px;
	color: #999;
	text-decoration: line-through;
}
.cpp-upsell-discounted {
	font-size: 16px;
	font-weight: 700;
	color: #e91e90;
}
.cpp-upsell-badge {
	display: inline-block;
	background: #e91e90;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	padding: 2px 6px;
	border-radius: 4px;
	line-height: 1.3;
}
.cpp-upsell-add-btn {
	display: block;
	width: 100%;
	padding: 10px 0;
	font-size: 14px;
	font-weight: 600;
	border: 2px solid #e91e90;
	border-radius: 8px;
	background: #fff;
	color: #e91e90;
	cursor: pointer;
	transition: background 0.2s, color 0.2s;
}
.cpp-upsell-add-btn:hover {
	background: #e91e90;
	color: #fff;
}
.cpp-upsell-add-btn:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}
.cpp-upsell-add-btn.cpp-upsell-added {
	background: #28a745;
	border-color: #28a745;
	color: #fff;
	cursor: default;
}

/* Mobile: fullscreen modal */
@media (max-width: 600px) {
	.cpp-scene-modal {
		padding: 0;
	}
	.cpp-scene-modal-inner {
		max-width: 100%;
		max-height: 100vh;
		max-height: 100dvh;
		border-radius: 0;
		height: 100%;
		height: 100dvh;
	}
	.cpp-scene-modal-header {
		padding: 10px 14px;
	}
	.cpp-scene-modal-title {
		font-size: 14px;
	}
	.cpp-scene-modal-canvas-area {
		max-height: 38vh;
		max-height: 38dvh;
		overflow: hidden;
		position: relative;
		touch-action: none; /* allow our JS to handle pinch on canvas */
	}
	.cpp-scene-modal-canvas-area canvas {
		max-height: 38vh;
		max-height: 38dvh;
		transform-origin: 0 0;
	}
	.cpp-scene-step-content {
		padding: 12px 14px;
	}
	.cpp-scene-wizard-nav {
		padding: 10px 14px;
		gap: 8px;
	}
	.cpp-scene-wizard-nav .cpp-btn {
		min-width: 0;
		flex: 1;
	}
	.cpp-scene-wizard-nav .cpp-btn-primary,
	.cpp-scene-wizard-nav .cpp-btn-secondary {
		padding: 10px 10px;
		font-size: 14px;
	}
	.cpp-scene-step-indicator {
		padding: 8px 14px 2px;
	}
	/* Prevent content from pushing nav off-screen */
	.cpp-scene-wizard {
		min-height: 0;
		overflow: hidden;
		display: flex;
		flex-direction: column;
	}
	.cpp-scene-step-content {
		flex: 1;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}

	/* Upload zone smaller on mobile */
	.cpp-scene-step-content .cpp-upload-zone {
		min-height: 80px;
	}
	.cpp-scene-step-content .cpp-upload-zone .cpp-dropzone-placeholder {
		font-size: 13px;
	}

	/* Color/font pickers scroll horizontally */
	.cpp-scene-step-content .cpp-color-picker,
	.cpp-scene-step-content .cpp-font-picker {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		flex-wrap: nowrap;
		padding-bottom: 4px;
	}
}
