
.scpo-section.scpo-layout-1\/1 { width: 100%; max-width: 100%; }
.scpo-section.scpo-layout-1\/2 { width: 50%; max-width: 50%; margin-left: auto; margin-right: auto; }
.scpo-section.scpo-layout-1\/3 { width: 33.333%; max-width: 33.333%; margin-left: auto; margin-right: auto; }
.scpo-section.scpo-layout-2\/3 { width: 66.666%; max-width: 66.666%; margin-left: auto; margin-right: auto; }
.scpo-section.scpo-layout-3\/4 { width: 75%; max-width: 75%; margin-left: auto; margin-right: auto; }
.scpo-section.scpo-layout-1\/5 { width: 20%; max-width: 20%; margin-left: auto; margin-right: auto; }
.scpo-section.scpo-layout-2\/5 { width: 40%; max-width: 40%; margin-left: auto; margin-right: auto; }
.scpo-section.scpo-layout-3\/5 { width: 60%; max-width: 60%; margin-left: auto; margin-right: auto; }
.scpo-section.scpo-layout-4\/5 { width: 80%; max-width: 80%; margin-left: auto; margin-right: auto; }
/**
 * SCPO Frontend Styles (Scoped to Single Product Page)
 */
.scpo-options-wrapper {
	margin: 20px 0;
	padding: 0;
	border: 0;
	border-radius: 6px;
	background: transparent;
}

.scpo-shortcode-options {
	clear: both;
	/*
	 * WordPress/TinyMCE serializes the alignment control on the shortcode's
	 * parent div (for example: <div style="text-align: right">[...]</div>).
	 * Keep the rendered SCPO block shrink-wrapped so that the parent's native
	 * text alignment can position the whole option block, while keeping the
	 * controls' own text left-aligned.
	 */
	display: inline-block;
	width: fit-content;
	max-width: 100%;
	vertical-align: top;
	text-align: left;
}

/* Option-set-level section layout. Missing/legacy values fall back to stacked. */
.scpo-option-set-section-grid {
	display: block;
	width: 100%;
	box-sizing: border-box;
}

.scpo-option-set-section-grid.scpo-option-set-layout-grid_2,
.scpo-option-set-section-grid.scpo-option-set-layout-grid_3 {
	display: grid;
	gap: 20px;
	align-items: start;
}

.scpo-option-set-section-grid.scpo-option-set-layout-grid_2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	justify-content: center;
	max-width: 860px;
	margin-left: auto;
	margin-right: auto;
}

.scpo-option-set-section-grid.scpo-option-set-layout-grid_3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.scpo-option-set-section-grid > .scpo-section {
	min-width: 0;
	box-sizing: border-box;
}

.scpo-option-set-section-grid.scpo-option-set-layout-grid_2 > .scpo-section,
.scpo-option-set-section-grid.scpo-option-set-layout-grid_3 > .scpo-section {
	width: 100%;
	max-width: 100%;
	margin-left: 0;
	margin-right: 0;
}

/* Option Set presentation presets. The pseudo-element keeps background art
 * decorative and prevents it from changing layout or reducing text contrast. */
.scpo-option-set {
	position: relative;
	overflow: visible;
	padding: 16px;
	border-radius: 6px;
	background: #ffffff;
	box-sizing: border-box;
}

.scpo-option-set::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: var(--scpo-bg-image, none);
	background-size: cover;
	background-position: center;
	opacity: var(--scpo-bg-opacity, 0);
	filter: blur(1px);
	transform: scale(1.02);
	pointer-events: none;
	z-index: 0;
}

.scpo-option-set > * {
	position: relative;
	z-index: 1;
}

.scpo-bg-white { background-color: #ffffff; }
.scpo-bg-blue { background-color: #f0f7ff; }
.scpo-bg-green { background-color: #f1faf4; }
.scpo-bg-yellow { background-color: #fffbea; }
.scpo-bg-red { background-color: #fff4f3; }

.scpo-shadow-none { box-shadow: none; }
.scpo-shadow-soft { box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08); }
.scpo-shadow-blurred { box-shadow: 0 8px 26px rgba(15, 23, 42, 0.13); }

.scpo-set-heading {
	margin-bottom: 14px;
}

.scpo-set-heading::after {
	content: "";
	display: block;
	clear: both;
}

.scpo-set-badge {
	display: inline-block;
	max-width: 100%;
	margin-bottom: 7px;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 0.78rem;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.01em;
	box-shadow: 0 3px 8px rgba(15, 23, 42, 0.14);
}

.scpo-set-badge-left { margin-left: -4px; }
.scpo-set-badge-right { margin-left: auto; float: right; }
.scpo-badge-info { background: #3b82f6; color: #ffffff; }
.scpo-badge-highlight { background: #f5c542; color: #3f3000; }
.scpo-badge-success { background: #21a366; color: #ffffff; }
.scpo-badge-promo { background: #f6d86b; color: #302300; padding: 5px 9px 5px 11px; }
.scpo-badge-neutral { background: #475569; color: #ffffff; }

.scpo-badge-promo .scpo-badge-secondary {
	display: inline-block;
	margin-right: 7px;
	font-size: 0.72rem;
	font-weight: 700;
}

.scpo-badge-promo .scpo-badge-primary {
	display: inline-block;
	padding: 3px 8px;
	border-radius: 4px;
	background: #dc2626;
	color: #ffffff;
	font-size: 0.78rem;
	font-weight: 800;
}

/* Display-only content blocks never behave like customer inputs. */
.scpo-content-block {
	max-width: 100%;
}

.scpo-plain-text {
	white-space: normal;
}

.scpo-font-system { font-family: inherit; }
.scpo-font-roboto { font-family: 'Roboto', sans-serif; }
.scpo-font-oswald { font-family: 'Oswald', sans-serif; }
.scpo-font-lora { font-family: 'Lora', serif; }
.scpo-font-poppins { font-family: 'Poppins', sans-serif; }
.scpo-font-quicksand { font-family: 'Quicksand', sans-serif; }

.scpo-image-block {
	width: 100%;
	text-align: center;
}

.scpo-image-block img {
	display: inline-block;
	width: auto;
	max-width: min(200px, 100%);
	height: auto;
	max-height: 150px;
	object-fit: contain;
	vertical-align: middle;
}

.scpo-preview-content-block {
	max-width: 100%;
}

.scpo-preview-image img {
	display: block;
	width: auto;
	max-width: min(200px, 100%);
	max-height: 150px;
	height: auto;
	object-fit: contain;
	margin: 0 auto;
}

.scpo-preview-image-placeholder {
	padding: 14px;
	border: 1px dashed #c3c4c7;
	color: #646970;
	text-align: center;
}

@media screen and (max-width: 900px) {
	.scpo-option-set-section-grid.scpo-option-set-layout-grid_3 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media screen and (max-width: 640px) {
	.scpo-option-set-section-grid.scpo-option-set-layout-grid_2,
	.scpo-option-set-section-grid.scpo-option-set-layout-grid_3 {
		grid-template-columns: 1fr;
	}
}

/*
 * TinyMCE placement wrapper. These rules are deliberately scoped to SCPO's
 * own markup so the plugin wins inside its block without changing the site's
 * global paragraph, form, or input styles.
 */
.scpo-shortcode-placement {
	display: block;
	width: 100%;
	max-width: 100%;
	clear: both;
	box-sizing: border-box;
}

.scpo-shortcode-placement > .scpo-shortcode-options {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

.scpo-shortcode-placement.alignleft > .scpo-shortcode-options,
.scpo-shortcode-placement[style*="text-align: left"] > .scpo-shortcode-options {
	margin-left: 0 !important;
	margin-right: auto !important;
}

.scpo-shortcode-placement.aligncenter > .scpo-shortcode-options,
.scpo-shortcode-placement[style*="text-align: center"] > .scpo-shortcode-options {
	width: fit-content;
	max-width: 100%;
	margin-left: auto !important;
	margin-right: auto !important;
}

.scpo-shortcode-placement.alignright > .scpo-shortcode-options,
.scpo-shortcode-placement[style*="text-align: right"] > .scpo-shortcode-options {
	width: fit-content;
	max-width: 100%;
	margin-left: auto !important;
	margin-right: 0 !important;
}

.scpo-shortcode-submit-bridge {
	display: none !important;
}

.scpo-set-title {
	font-size: 1.15rem;
	font-weight: 600;
	margin-top: 0;
	margin-bottom: 12px;
	border-bottom: 2px solid #cbd5e1;
	padding-bottom: 6px;
	color: #1e293b;
}

.scpo-section {
	margin-bottom: 16px;
}

.scpo-section-title {
	font-size: 1rem;
	font-weight: 600;
	margin: 10px 0 4px 0;
	color: #334155;
}

.scpo-section-description {
	font-size: 0.85rem;
	color: #64748b;
	margin-bottom: 12px;
}

.scpo-field-row {
	margin-bottom: 14px;
}

/* Keep standalone checkbox rows as compact as the options inside radio groups. */
.scpo-field-type-checkbox {
	margin-bottom: 0;
}

.scpo-field-label {
	display: block;
	font-weight: 600;
	font-size: 0.9rem;
	margin-bottom: 4px;
	color: #1e293b;
}

.scpo-field-description {
	font-size: 0.8rem;
	color: #64748b;
	margin: 2px 0 6px 0;
}

.scpo-input {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid #cbd5e1;
	border-radius: 4px;
	font-size: 0.95rem;
	box-sizing: border-box;
	background: #fff;
}

.scpo-input:focus {
	border-color: #3b82f6;
	outline: none;
	box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.scpo-checkbox-label, .scpo-radio-label, .scpo-multiselect-label {
	font-size: 0.9rem;
	color: #334155;
	cursor: pointer;
	line-height: 1.6;
}

/* Multi-select group */
.scpo-multiselect-group {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.scpo-multiselect-label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.scpo-multiselect-input {
	margin: 0;
}

/* Image Select Grid & Cards */
.scpo-imageselect-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
	gap: 12px;
	margin-top: 6px;
}

.scpo-image-choice-card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: #ffffff;
	border: 2px solid #e2e8f0;
	border-radius: 8px;
	overflow: hidden;
	cursor: pointer;
	transition: all 0.15s ease-in-out;
	outline: none;
	user-select: none;
}

.scpo-image-choice-card:hover {
	border-color: #94a3b8;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.scpo-image-choice-card:focus,
.scpo-image-choice-card:focus-visible {
	border-color: #3b82f6;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.scpo-image-choice-card.is-selected {
	border-color: #2563eb;
	background-color: #eff6ff;
	box-shadow: 0 0 0 1px #2563eb;
}

.scpo-imageselect-radio {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	pointer-events: none;
}

.scpo-image-choice-preview {
	width: 100%;
	height: 100px;
	background: #f1f5f9;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.scpo-image-thumb {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.scpo-image-placeholder {
	font-size: 32px;
	color: #94a3b8;
}

.scpo-image-choice-info {
	padding: 8px;
	display: flex;
	flex-direction: column;
	gap: 2px;
	text-align: center;
}

.scpo-image-choice-label {
	font-size: 0.85rem;
	font-weight: 600;
	color: #1e293b;
	line-height: 1.25;
}

.scpo-image-choice-price {
	font-size: 0.8rem;
	font-weight: 500;
	color: #2563eb;
}

.scpo-price-summary-box {
	margin-top: 18px;
	padding: 12px 16px;
	background: #ffffff;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.scpo-summary-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 0.9rem;
	margin-bottom: 6px;
	color: #475569;
}

.scpo-total-row {
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px solid #e2e8f0;
	font-size: 1.05rem;
	color: #0f172a;
}

/* Section Layout and Alignment */
.scpo-columns-wrap {
    display: flex;
    gap: 1.25rem;
    width: 100%;
    box-sizing: border-box;
}
.scpo-columns-wrap.scpo-layout-standard {
    flex-direction: column;
}
.scpo-columns-wrap.scpo-layout-2col,
.scpo-columns-wrap.scpo-layout-3col,
.scpo-columns-wrap.scpo-layout-custom {
    flex-direction: row;
    flex-wrap: wrap;
}
.scpo-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
    box-sizing: border-box;
}
.scpo-align-left {
    justify-content: flex-start;
    text-align: left;
}
.scpo-align-left .scpo-field-row {
    align-items: flex-start;
    text-align: left;
}
.scpo-align-center {
    justify-content: center;
    text-align: center;
}
.scpo-align-center .scpo-field-row {
    align-items: center;
    text-align: center;
    justify-content: center;
}
.scpo-align-right {
    justify-content: flex-end;
    text-align: right;
}
.scpo-align-right .scpo-field-row {
    align-items: flex-end;
    text-align: right;
    justify-content: flex-end;
}
