/*
 * SWID Custom Products: the builder (1.5.5 redesign).
 *
 * ══ LUXURY DARK, WITH A SELECTED STATE NOBODY CAN MISS ═════════════════════
 *
 * Surfaces step up in lightness so sections and cards read apart on the dark
 * page: page < panel < card < chosen card. Gold comes from the theme's own
 * palette (Blocksy `--theme-palette-color-1`), so the builder matches the shop
 * header and prices; the fallbacks apply only on a theme without it.
 *
 * A chosen card changes in FOUR ways at once, so the state never depends on
 * colour alone: a gold border, a gold ring, a warmer background, and a gold
 * check mark (`.swid-cp-check`). Hover lifts the border; keyboard focus draws a
 * separate, visible ring; a card that cannot be chosen is muted and says why.
 *
 * Grids are `auto-fill` with a minimum card width, so they reflow at every
 * width; the few media queries are about layout (stacking, scrolling rows).
 */

.swid-cp {
	--swid-cp-gold: var( --theme-palette-color-1, #d6a756 );
	--swid-cp-gold-deep: var( --theme-palette-color-2, #a8742a );
	--swid-cp-ink: #f4ecdf;
	--swid-cp-muted: #b3a894;
	--swid-cp-faint: #847a6a;
	--swid-cp-panel: #121110;
	--swid-cp-card: #1b1a18;
	--swid-cp-card-hover: #23211e;
	--swid-cp-chosen: #2a2318;
	--swid-cp-line: #3a362f;
	--swid-cp-line-strong: #5c5447;
	--swid-cp-danger: #ff8a7a;
	--swid-cp-warn: #f2c46d;
	--swid-cp-radius: 14px;
	--swid-cp-radius-sm: 10px;
	--swid-cp-gap: 12px;
	--swid-cp-focus: 0 0 0 3px #0b0a09, 0 0 0 5px var( --swid-cp-gold );

	counter-reset: swid-cp-step;
	color: var( --swid-cp-ink );
	display: block;
	margin: 0 0 1.5rem;
	max-width: 100%;
	min-width: 0;
	width: 100%;
}

.swid-cp *,
.swid-cp *::before,
.swid-cp *::after {
	box-sizing: border-box;
}

/* `hidden` always wins inside the builder, whatever display a component sets. */
.swid-cp [hidden] {
	display: none !important;
}

/* WooCommerce wraps the add-to-cart area in boxes that grow to their widest child. */
.variations_form .single_variation_wrap,
.variations_form .woocommerce-variation-add-to-cart {
	max-width: 100%;
	min-width: 0;
}

/*
 * When the builder draws the size cards it owns the size: Woo's own size row
 * (and the Extra Product Options copy of it) is hidden, but stays in the form
 * and is still set by the builder, so add-to-cart posts the right variation.
 */
form.swid-cp-owns-size table.variations,
form.swid-cp-owns-size .tm-epo-variation-element,
form.swid-cp-owns-size .tc-epo-element-variations,
form.swid-cp-owns-size .tm-extra-product-options-variations {
	display: none !important;
}

/* ── Sections: numbered by what is actually shown ─────────────────────────── */

.swid-cp-section {
	background: var( --swid-cp-panel );
	border: 1px solid var( --swid-cp-line );
	border-radius: var( --swid-cp-radius );
	margin: 0 0 16px;
	min-width: 0;
	padding: 20px;
}

.swid-cp-section[hidden],
.swid-cp-panel[hidden] {
	display: none !important;
}

.swid-cp-section:not( [hidden] ) {
	counter-increment: swid-cp-step;
}

.swid-cp-heading {
	align-items: center;
	color: var( --swid-cp-ink );
	display: flex;
	font-size: 1.05rem;
	font-weight: 600;
	gap: 12px;
	letter-spacing: 0.08em;
	line-height: 1.3;
	margin: 0 0 16px;
	text-transform: uppercase;
}

.swid-cp-section > .swid-cp-heading::before {
	align-items: center;
	border: 1.5px solid var( --swid-cp-gold );
	border-radius: 50%;
	color: var( --swid-cp-gold );
	content: counter( swid-cp-step );
	display: inline-flex;
	flex: 0 0 auto;
	font-size: 0.9rem;
	height: 30px;
	justify-content: center;
	letter-spacing: 0;
	width: 30px;
}

.swid-cp-subheading {
	color: var( --swid-cp-muted );
	font-size: 0.8rem;
	letter-spacing: 0.1em;
	margin: 4px 0 10px;
	text-transform: uppercase;
}

.swid-cp-hint {
	color: var( --swid-cp-muted );
	margin: 0 0 12px;
	min-height: 1.4em;
}

.swid-cp-hint:empty {
	display: none;
}

/* ── The check mark every selectable card carries ────────────────────────── */

.swid-cp-check {
	align-items: center;
	background: var( --swid-cp-gold );
	border-radius: 50%;
	color: #141008;
	display: inline-flex;
	flex: 0 0 auto;
	height: 22px;
	justify-content: center;
	opacity: 0;
	transform: scale( 0.6 );
	transition: opacity 0.15s ease, transform 0.15s ease;
	width: 22px;
}

.is-active > .swid-cp-check,
.is-chosen > .swid-cp-check,
.is-picked > .swid-cp-check,
.swid-cp-selected-label > .swid-cp-check {
	opacity: 1;
	transform: none;
}

/* ── Shared card behaviour ────────────────────────────────────────────────── */

.swid-cp-mode,
.swid-cp-oil,
.swid-cp-style-card,
.swid-cp-size-card,
.swid-cp-bottle,
.swid-cp-font,
.swid-cp-icon-choice,
.swid-cp-layer {
	-webkit-appearance: none;
	appearance: none;
	background: var( --swid-cp-card );
	border: 1.5px solid var( --swid-cp-line );
	border-radius: var( --swid-cp-radius-sm );
	color: var( --swid-cp-ink );
	cursor: pointer;
	font: inherit;
	min-height: 48px;
	position: relative;
	text-align: left;
	text-transform: none;
	transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.swid-cp-mode:hover:not( :disabled ),
.swid-cp-oil:hover:not( :disabled ),
.swid-cp-style-card:hover:not( :disabled ),
.swid-cp-size-card:hover:not( :disabled ),
.swid-cp-bottle:hover:not( :disabled ),
.swid-cp-font:hover,
.swid-cp-icon-choice:hover,
.swid-cp-layer:hover {
	background: var( --swid-cp-card-hover );
	border-color: var( --swid-cp-line-strong );
}

.swid-cp-mode:focus-visible,
.swid-cp-oil:focus-visible,
.swid-cp-style-card:focus-visible,
.swid-cp-size-card:focus-visible,
.swid-cp-bottle:focus-visible,
.swid-cp-font:focus-visible,
.swid-cp-icon-choice:focus-visible,
.swid-cp-layer:focus-visible,
.swid-cp-remove:focus-visible,
.swid-cp-engraving-clear:focus-visible,
.swid-cp input:focus-visible,
.swid-cp select:focus-visible {
	box-shadow: var( --swid-cp-focus );
	outline: none;
}

.swid-cp-mode.is-active,
.swid-cp-oil.is-picked,
.swid-cp-style-card.is-chosen,
.swid-cp-size-card.is-chosen,
.swid-cp-bottle.is-active,
.swid-cp-font.is-active,
.swid-cp-icon-choice.is-chosen,
.swid-cp-layer.is-active {
	background: var( --swid-cp-chosen );
	border-color: var( --swid-cp-gold );
	box-shadow: 0 0 0 1px var( --swid-cp-gold ), 0 6px 22px rgba( 214, 167, 86, 0.18 );
}

.swid-cp-oil:disabled,
.swid-cp-style-card:disabled,
.swid-cp-size-card:disabled,
.swid-cp-bottle:disabled,
.swid-cp-bottle.is-sold-out {
	cursor: not-allowed;
	opacity: 0.45;
}

/* ── 1. How to build ─────────────────────────────────────────────────────── */

.swid-cp-modes {
	display: grid;
	gap: var( --swid-cp-gap );
	grid-template-columns: repeat( auto-fit, minmax( min( 170px, 100% ), 1fr ) );
}

.swid-cp-mode {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 16px 44px 16px 16px;
}

.swid-cp-mode > .swid-cp-check {
	position: absolute;
	right: 12px;
	top: 12px;
}

.swid-cp-mode-title {
	font-size: 1rem;
	font-weight: 600;
}

.swid-cp-mode.is-active .swid-cp-mode-title {
	color: var( --swid-cp-gold );
}

.swid-cp-mode-text {
	color: var( --swid-cp-muted );
	font-size: 0.875rem;
	line-height: 1.4;
}

.swid-cp-layers {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 14px;
}

.swid-cp-layer {
	padding: 8px 18px;
	text-align: center;
}

.swid-cp-layer-note {
	color: var( --swid-cp-faint );
	flex-basis: 100%;
	font-size: 0.85rem;
	margin: 2px 0 0;
}

/* ── 2. Scents ───────────────────────────────────────────────────────────── */

.swid-cp-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 14px;
	min-width: 0;
}

.swid-cp-search {
	flex: 1 1 220px;
	min-width: 0;
}

.swid-cp-collection {
	flex: 0 1 200px;
	min-width: 0;
}

/* 1.5.6: the brand filter sits beside the search; it comes first in the markup so the two share a row. */
.swid-cp-brand {
	flex: 0 1 200px;
	min-width: 160px;
}

.swid-cp-brand[hidden] {
	display: none !important;
}

.swid-cp-filters input,
.swid-cp-filters select,
.swid-cp-engraving input,
.swid-cp-placements select,
.swid-cp-icon-position select {
	background: var( --swid-cp-card );
	border: 1.5px solid var( --swid-cp-line );
	border-radius: 999px;
	color: var( --swid-cp-ink );
	font: inherit;
	min-height: 48px;
	padding: 0 18px;
	width: 100%;
}

.swid-cp-filters input::placeholder,
.swid-cp-engraving input::placeholder {
	color: var( --swid-cp-faint );
}

.swid-cp-grid {
	display: grid;
	gap: var( --swid-cp-gap );
	/* A card spends ~106px on padding, initial and check; 220px leaves a name room for two lines at most. */
	grid-template-columns: repeat( auto-fill, minmax( min( 220px, 100% ), 1fr ) );
	max-height: 30rem;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 4px;
	scrollbar-color: var( --swid-cp-line-strong ) transparent;
}

.swid-cp-oil {
	align-items: center;
	display: flex;
	gap: 12px;
	min-width: 0;
	padding: 10px 40px 10px 10px;
}

.swid-cp-oil > .swid-cp-check {
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY( -50% ) scale( 0.6 );
}

.swid-cp-oil.is-picked > .swid-cp-check {
	transform: translateY( -50% );
}

.swid-cp-oil-media {
	align-items: center;
	background: #0e0d0c;
	border: 1px solid var( --swid-cp-line );
	border-radius: 8px;
	display: flex;
	flex: 0 0 44px;
	height: 44px;
	justify-content: center;
	overflow: hidden;
	width: 44px;
}

.swid-cp-oil-media img {
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.swid-cp-oil-initial {
	color: var( --swid-cp-gold );
	font-size: 1.1rem;
	font-weight: 600;
}

.swid-cp-oil-body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.swid-cp-oil-name {
	font-size: 0.9rem;
	font-weight: 600;
	hyphens: auto;
	line-height: 1.25;
	overflow-wrap: break-word;
	word-break: normal;
}

.swid-cp-oil.is-picked .swid-cp-oil-name {
	color: var( --swid-cp-gold );
}

/* The Oil Library's brand line ("Inspired by …"), quieter than the name. */
.swid-cp-oil-brand {
	color: var( --swid-cp-muted );
	font-size: 0.78rem;
	line-height: 1.3;
	overflow-wrap: break-word;
}

.swid-cp-oil-flag {
	align-self: flex-start;
	border: 1px solid var( --swid-cp-warn );
	border-radius: 999px;
	color: var( --swid-cp-warn );
	font-size: 0.7rem;
	letter-spacing: 0.04em;
	padding: 1px 8px;
}

.swid-cp-empty {
	color: var( --swid-cp-muted );
	grid-column: 1 / -1;
	margin: 0;
	padding: 8px;
}

.swid-cp-selected-wrap {
	margin: 0 0 14px;
}

.swid-cp-selected {
	display: flex;
	flex-direction: column;
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.swid-cp-selected-row {
	align-items: center;
	background: var( --swid-cp-chosen );
	border: 1.5px solid var( --swid-cp-gold );
	border-radius: var( --swid-cp-radius-sm );
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	min-height: 52px;
	padding: 8px 8px 8px 12px;
}

.swid-cp-selected-label {
	align-items: center;
	display: flex;
	flex: 1 1 160px;
	gap: 10px;
	min-width: 0;
}

.swid-cp-selected-name {
	color: var( --swid-cp-ink );
	font-weight: 600;
	overflow-wrap: anywhere;
}

.swid-cp-selected-layer {
	border: 1px solid var( --swid-cp-line-strong );
	border-radius: 999px;
	color: var( --swid-cp-muted );
	font-size: 0.75rem;
	padding: 1px 8px;
}

.swid-cp-ratio {
	accent-color: var( --swid-cp-gold );
	flex: 1 1 140px;
	min-height: 44px;
	min-width: 120px;
}

.swid-cp-remove {
	align-items: center;
	background: transparent;
	border: 1px solid var( --swid-cp-line-strong );
	border-radius: 50%;
	color: var( --swid-cp-ink );
	cursor: pointer;
	display: inline-flex;
	flex: 0 0 auto;
	font-size: 1.3rem;
	height: 40px;
	justify-content: center;
	line-height: 1;
	padding: 0;
	width: 40px;
}

.swid-cp-remove:hover {
	border-color: var( --swid-cp-gold );
	color: var( --swid-cp-gold );
}

.swid-cp-ratio-hint {
	color: var( --swid-cp-muted );
	font-size: 0.85rem;
	margin: 8px 0 0;
}

/* ── 3. Bottle & size ────────────────────────────────────────────────────── */

.swid-cp-styles,
.swid-cp-bottles {
	display: grid;
	gap: var( --swid-cp-gap );
	grid-template-columns: repeat( auto-fill, minmax( min( 140px, 100% ), 1fr ) );
	margin: 0 0 16px;
}

.swid-cp-style-card,
.swid-cp-bottle {
	align-items: center;
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 36px 12px 14px;
	text-align: center;
}

.swid-cp-style-card > .swid-cp-check,
.swid-cp-bottle > .swid-cp-check {
	position: absolute;
	right: 10px;
	top: 10px;
}

.swid-cp-style-card-image,
.swid-cp-bottle-media {
	align-items: center;
	display: flex;
	height: 120px;
	justify-content: center;
	object-fit: contain;
	width: 100%;
}

.swid-cp-bottle-media img {
	max-height: 100%;
	max-width: 100%;
	object-fit: contain;
}

.swid-cp-bottle-initial {
	color: var( --swid-cp-gold );
	font-size: 2rem;
}

.swid-cp-style-card-name,
.swid-cp-bottle-name {
	font-weight: 600;
	line-height: 1.25;
}

.swid-cp-style-card.is-chosen .swid-cp-style-card-name,
.swid-cp-bottle.is-active .swid-cp-bottle-name {
	color: var( --swid-cp-gold );
}

.swid-cp-style-card-extra,
.swid-cp-bottle-delta {
	color: var( --swid-cp-gold );
	font-size: 0.85rem;
}

.swid-cp-style-card-sizes {
	color: var( --swid-cp-faint );
	font-size: 0.75rem;
}

.swid-cp-bottle-flag {
	color: var( --swid-cp-danger );
	font-size: 0.8rem;
}

.swid-cp-sizes {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.swid-cp-size-card {
	align-items: center;
	display: flex;
	flex: 0 1 112px;
	flex-direction: column;
	justify-content: center;
	min-height: 64px;
	min-width: 96px;
	padding: 10px 14px;
	text-align: center;
}

.swid-cp-size-card > .swid-cp-check {
	position: absolute;
	right: 6px;
	top: 6px;
	height: 18px;
	width: 18px;
}

.swid-cp-size-card-label {
	font-size: 1.05rem;
	font-weight: 600;
}

.swid-cp-size-card.is-chosen {
	background: var( --swid-cp-gold );
	color: #141008;
}

.swid-cp-size-card.is-chosen > .swid-cp-check {
	background: #141008;
	color: var( --swid-cp-gold );
}

.swid-cp-size-card-extra {
	font-size: 0.8rem;
	opacity: 0.85;
}

.swid-cp-size-card-out {
	color: var( --swid-cp-danger );
	font-size: 0.75rem;
}

/*
 * ── The bottle, large (1.5.6) ───────────────────────────────────────────────
 * The one preview stage, moved here from the engraving section and centred
 * under the bottle and size choices. It appears once a bottle with a picture
 * is chosen; the engraving is drawn on it while engraving is offered.
 */

.swid-cp-preview {
	align-items: center;
	border-top: 1px solid var( --swid-cp-line );
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 16px 0 0;
	padding: 16px 0 0;
}

.swid-cp-preview[hidden],
.swid-cp-stage[hidden],
.swid-cp-stage-engraving[hidden],
.swid-cp-stage-icon[hidden],
.swid-cp-stage-text[hidden],
.swid-cp-subheading[hidden] {
	display: none !important;
}

.swid-cp-preview-caption {
	color: var( --swid-cp-faint );
	font-size: 0.75rem;
	letter-spacing: 0.1em;
	margin: 0;
	text-transform: uppercase;
}

/* ── 4. Engraving ────────────────────────────────────────────────────────── */

.swid-cp-personalise {
	align-items: flex-start;
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
}

.swid-cp-stage {
	aspect-ratio: 3 / 4;
	background: radial-gradient( ellipse at 50% 40%, #1d1b18 0%, #0e0d0c 70% );
	border: 1px solid var( --swid-cp-line );
	border-radius: var( --swid-cp-radius-sm );
	flex: 0 0 auto;
	margin: 0 auto;
	max-width: 100%;
	overflow: hidden;
	position: relative;
	width: min( 360px, 100% );
}

.swid-cp-stage-bottle {
	display: block;
	height: 100%;
	object-fit: contain;
	width: 100%;
}

.swid-cp-stage-engraving {
	align-items: center;
	display: flex;
	flex-direction: column;
	gap: 2px;
	justify-content: center;
	left: 50%;
	pointer-events: none;
	position: absolute;
	top: 50%;
	transform: translate( -50%, -50% );
}

.swid-cp-stage-engraving[ data-layout="below" ] { flex-direction: column-reverse; }
.swid-cp-stage-engraving[ data-layout="left" ] { flex-direction: row; gap: 6px; }
.swid-cp-stage-engraving[ data-layout="right" ] { flex-direction: row-reverse; gap: 6px; }

/*
 * Text alignment inside the zone (1.5.7). Left/right: the wrapper spans the
 * zone (width set inline from its rect) and the name sits against that side.
 * Center keeps the 1.5.6 rules above untouched (no data-align attribute).
 */
.swid-cp-stage-engraving[ data-align="left" ],
.swid-cp-stage-engraving[ data-align="right" ] { transform: translate( 0, -50% ); }
.swid-cp-stage-engraving[ data-align="left" ] { align-items: flex-start; }
.swid-cp-stage-engraving[ data-align="right" ] { align-items: flex-end; }
.swid-cp-stage-engraving[ data-align="left" ][ data-layout="left" ],
.swid-cp-stage-engraving[ data-align="right" ][ data-layout="right" ] { align-items: center; justify-content: flex-start; }
.swid-cp-stage-engraving[ data-align="left" ][ data-layout="right" ],
.swid-cp-stage-engraving[ data-align="right" ][ data-layout="left" ] { align-items: center; justify-content: flex-end; }
.swid-cp-stage-engraving[ data-align="left" ] .swid-cp-stage-text { text-align: left; }
.swid-cp-stage-engraving[ data-align="right" ] .swid-cp-stage-text { text-align: right; }

/*
 * Etched, not printed (1.5.6): a frosted near-white with a thin dark relief, so
 * the cut reads on clear, dark and coloured glass alike. The symbol is the same
 * frost — its artwork is dark line work, turned white the way the icon cards
 * already turn it.
 */
.swid-cp-stage-icon {
	display: block;
	filter: brightness( 0 ) invert( 1 ) drop-shadow( 0 1px 0 rgba( 0, 0, 0, 0.45 ) );
	flex: 0 0 auto;
	object-fit: contain;
	opacity: 0.88;
}

/*
 * The symbol in its own area (1.5.7): a direct child of the stage, placed and
 * sized inline from the placement's icon_zone (fractions of the stage). Never
 * draggable, never outlined — the customer only sees the result.
 */
.swid-cp-stage-icon.is-zoned {
	pointer-events: none;
	position: absolute;
}

.swid-cp-stage-text {
	color: rgba( 255, 255, 255, 0.88 );
	letter-spacing: 0.02em;
	line-height: 1.1;
	max-width: 100%;
	overflow: hidden;
	pointer-events: none;
	text-align: center;
	text-overflow: ellipsis;
	text-shadow: 0 1px 0 rgba( 0, 0, 0, 0.55 ), 0 -1px 0 rgba( 0, 0, 0, 0.25 ), 0 0 2px rgba( 0, 0, 0, 0.35 );
	white-space: nowrap;
}

.swid-cp-personalise-fields {
	flex: 1 1 260px;
	min-width: 0;
}

.swid-cp-engraving {
	display: block;
	margin: 0 0 12px;
}

.swid-cp-engraving-field {
	display: block;
	position: relative;
}

.swid-cp-engraving input {
	padding-right: 72px;
}

.swid-cp-engraving-count {
	color: var( --swid-cp-faint );
	font-size: 0.85rem;
	position: absolute;
	right: 18px;
	top: 50%;
	transform: translateY( -50% );
}

.swid-cp-field-label {
	color: var( --swid-cp-muted );
	display: block;
	font-size: 0.8rem;
	letter-spacing: 0.08em;
	margin: 0 0 6px;
	text-transform: uppercase;
}

.swid-cp-font-list,
.swid-cp-icon-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 12px;
}

.swid-cp-font {
	font-size: 1.05rem;
	padding: 6px 16px;
	text-align: center;
}

.swid-cp-icon-choice {
	align-items: center;
	display: inline-flex;
	flex-direction: column;
	gap: 4px;
	min-width: 72px;
	padding: 8px;
	text-align: center;
}

.swid-cp-icon-choice-image {
	filter: invert( 1 );
	height: 34px;
	object-fit: contain;
	width: 34px;
}

.swid-cp-icon-choice-label {
	font-size: 0.75rem;
}

.swid-cp-icon-position,
.swid-cp-placements {
	display: block;
	margin: 0 0 12px;
}

.swid-cp-placements select,
.swid-cp-icon-position select {
	max-width: 280px;
}

.swid-cp-engraving-note {
	color: var( --swid-cp-muted );
	font-size: 0.9rem;
	margin: 6px 0 0;
}

.swid-cp-engraving-note.is-warning {
	color: var( --swid-cp-danger );
	font-weight: 600;
}

.swid-cp-engraving-clear {
	background: none;
	border: 0;
	color: var( --swid-cp-muted );
	cursor: pointer;
	min-height: 44px;
	padding: 0;
	text-decoration: underline;
}

/* ── 5. Review ───────────────────────────────────────────────────────────── */

.swid-cp-summary-card {
	background: var( --swid-cp-card );
	border: 1px solid var( --swid-cp-line );
	border-radius: var( --swid-cp-radius-sm );
	padding: 18px;
}

.swid-cp-summary-bottle {
	color: var( --swid-cp-gold );
	font-size: 1.15rem;
	font-weight: 600;
	margin: 0 0 8px;
}

.swid-cp-summary-facts {
	display: grid;
	gap: 4px 12px;
	grid-template-columns: auto 1fr;
	margin: 0 0 10px;
}

.swid-cp-summary-facts dt {
	color: var( --swid-cp-muted );
}

.swid-cp-summary-facts dd {
	margin: 0;
}

/* Single Scent (1.5.6): the perfume's name leads, the brand line beneath it is quieter. */
.swid-cp-summary-single .swid-cp-summary-scent {
	color: var( --swid-cp-gold );
	font-weight: 600;
}

.swid-cp-summary-single .swid-cp-summary-brand {
	color: var( --swid-cp-muted );
}

.swid-cp-summary-label {
	color: var( --swid-cp-muted );
	font-size: 0.8rem;
	letter-spacing: 0.1em;
	margin: 6px 0 6px;
	text-transform: uppercase;
}

.swid-cp-summary-formula {
	list-style: none;
	margin: 0 0 12px;
	padding: 0;
}

.swid-cp-summary-formula li {
	font-weight: 600;
	padding: 3px 0 3px 18px;
	position: relative;
}

.swid-cp-summary-formula li::before {
	background: var( --swid-cp-gold );
	border-radius: 50%;
	content: "";
	height: 7px;
	left: 2px;
	position: absolute;
	top: 0.75em;
	width: 7px;
}

.swid-cp-summary-layer {
	color: var( --swid-cp-faint );
	font-size: 0.8rem;
	font-weight: 400;
	margin-left: 8px;
}

.swid-cp-summary-total {
	align-items: baseline;
	border-top: 1px solid var( --swid-cp-line );
	display: flex;
	justify-content: space-between;
	margin: 12px 0 0;
	padding-top: 12px;
}

.swid-cp-summary-total strong {
	color: var( --swid-cp-gold );
	font-size: 1.4rem;
}

.swid-cp-summary-empty {
	color: var( --swid-cp-muted );
	margin: 0;
}

.swid-cp-errors,
.swid-cp-warnings {
	border-radius: var( --swid-cp-radius-sm );
	font-size: 0.9rem;
	list-style: none;
	margin: 12px 0 0;
	padding: 10px 14px;
}

.swid-cp-errors {
	background: rgba( 255, 138, 122, 0.08 );
	border: 1px solid var( --swid-cp-danger );
	color: var( --swid-cp-danger );
}

.swid-cp-warnings {
	background: rgba( 242, 196, 109, 0.08 );
	border: 1px solid var( --swid-cp-warn );
	color: var( --swid-cp-warn );
}

.swid-cp-errors[hidden],
.swid-cp-warnings[hidden] {
	display: none;
}

/* The add-to-cart button below the builder: strong, and clearly disabled until the build is valid. */
.variations_form:has( .swid-cp ) .single_add_to_cart_button,
form.cart:has( .swid-cp ) .single_add_to_cart_button {
	font-weight: 700;
	letter-spacing: 0.08em;
	min-height: 52px;
	text-transform: uppercase;
}

form.cart:has( .swid-cp ) .single_add_to_cart_button.disabled,
form.cart:has( .swid-cp ) .single_add_to_cart_button:disabled {
	cursor: not-allowed;
	opacity: 0.5;
}

/* ── Phones and small tablets ────────────────────────────────────────────── */

@media ( max-width: 600px ) {
	.swid-cp-section {
		border-radius: 12px;
		padding: 16px 14px;
	}

	.swid-cp-modes {
		grid-template-columns: 1fr;
	}

	.swid-cp-grid {
		max-height: 26rem;
	}

	/* Bottles: two whole cards per row, nothing cut off at the screen edge. */
	.swid-cp-styles,
	.swid-cp-bottles {
		gap: 10px;
		grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
	}

	.swid-cp-size-card {
		flex: 1 1 calc( 50% - 10px );
	}

	.swid-cp-stage {
		width: 100%;
	}

	/* Search, brand and collection stack, each full width and a comfortable tap target. */
	.swid-cp-filters {
		flex-direction: column;
	}

	.swid-cp-search,
	.swid-cp-brand,
	.swid-cp-collection {
		flex: 0 0 auto;
		min-width: 0;
		width: 100%;
	}

	.swid-cp-filters input,
	.swid-cp-filters select {
		min-height: 48px;
	}
}

/* Phones: one oil per row, so a perfume's name reads on one or two lines, not one word per line. */
@media ( max-width: 480px ) {
	.swid-cp-grid {
		grid-template-columns: minmax( 0, 1fr );
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.swid-cp * {
		animation: none !important;
		transition: none !important;
	}
}

/* ══ The six-step Custom Made flow (1.6.0) ══════════════════════════════════
 *
 * Build, Size, Bottle, Scent, Engraving, Review — one step on screen at a
 * time. Everything here is scoped to `.swid-cp--flow`, which builder.js adds
 * only for a Custom Made product on the Bottle Style registry; the ready-oil
 * Single Scent Selector and the legacy one-page layout never match it.
 */

.swid-cp--flow .swid-cp-step-off {
	display: none !important;
}

/* A step change scrolls the builder back into view: leave room for a sticky site header. */
.swid-cp--flow {
	scroll-margin-top: 120px;
}

/* The progress bar carries the numbers, so the sections do not repeat them. */
.swid-cp--flow .swid-cp-section > .swid-cp-heading::before {
	content: none;
	display: none;
}

.swid-cp-progress {
	counter-reset: none;
	display: grid;
	gap: 6px;
	grid-template-columns: repeat( 6, minmax( 0, 1fr ) );
	list-style: none;
	margin: 0 0 16px;
	padding: 0;
}

.swid-cp-progress-step {
	margin: 0;
	min-width: 0;
	padding: 0;
}

.swid-cp-progress-button {
	align-items: center;
	background: transparent;
	border: 0;
	border-top: 3px solid var( --swid-cp-line );
	color: var( --swid-cp-faint );
	cursor: pointer;
	display: flex;
	flex-direction: column;
	font: inherit;
	gap: 6px;
	min-height: 44px;
	padding: 10px 2px 4px;
	width: 100%;
}

.swid-cp-progress-button:disabled {
	cursor: default;
}

.swid-cp-progress-button:focus-visible {
	box-shadow: var( --swid-cp-focus );
	outline: none;
}

.swid-cp-progress-number {
	align-items: center;
	border: 1.5px solid currentColor;
	border-radius: 50%;
	display: inline-flex;
	font-size: 0.85rem;
	font-weight: 600;
	height: 28px;
	justify-content: center;
	width: 28px;
}

.swid-cp-progress-label {
	font-size: 0.72rem;
	letter-spacing: 0.06em;
	line-height: 1.2;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	text-transform: uppercase;
	white-space: nowrap;
}

.swid-cp-progress-step.is-done .swid-cp-progress-button {
	border-top-color: var( --swid-cp-gold-deep );
	color: var( --swid-cp-muted );
}

.swid-cp-progress-step.is-done .swid-cp-progress-number {
	background: var( --swid-cp-gold-deep );
	border-color: var( --swid-cp-gold-deep );
	color: #0b0a09;
}

.swid-cp-progress-step.is-current .swid-cp-progress-button {
	border-top-color: var( --swid-cp-gold );
	color: var( --swid-cp-gold );
}

.swid-cp-progress-step.is-current .swid-cp-progress-number {
	background: var( --swid-cp-gold );
	border-color: var( --swid-cp-gold );
	color: #0b0a09;
}

/* 1.7.0: the approved perfume being bought, or why its link could not be used. */
.swid-cp-recipe-note {
	background: var( --swid-cp-card );
	border: 1px solid var( --swid-cp-gold );
	border-radius: var( --swid-cp-radius-sm );
	color: var( --swid-cp-ink );
	line-height: 1.45;
	margin: 0 0 14px;
	overflow-wrap: anywhere;
	padding: 12px 14px;
}

.swid-cp-recipe-link {
	color: var( --swid-cp-gold );
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* A transparent outline is what forced-colours mode draws; the ring follows a link that wraps. */
.swid-cp-recipe-link:focus-visible {
	-webkit-box-decoration-break: clone;
	border-radius: 4px;
	box-decoration-break: clone;
	box-shadow: var( --swid-cp-focus );
	outline: 2px solid transparent;
	outline-offset: 2px;
}

/* An approved perfume has three steps, not six: they share the width. */
.swid-cp--recipe .swid-cp-progress {
	grid-template-columns: repeat( 3, minmax( 0, 1fr ) );
}

/* Why the customer was brought back to this step. */
.swid-cp-notice {
	background: var( --swid-cp-chosen );
	border: 1px solid var( --swid-cp-warn );
	border-radius: var( --swid-cp-radius-sm );
	color: var( --swid-cp-ink );
	line-height: 1.45;
	margin: 0 0 14px;
	padding: 12px 14px;
}

/* Step 2: the size and the variation's own price, on a card a thumb can hit. */
.swid-cp--flow .swid-cp-sizes {
	display: grid;
	gap: 12px;
	grid-template-columns: repeat( auto-fit, minmax( 150px, 1fr ) );
}

.swid-cp--flow .swid-cp-size-card {
	align-items: flex-start;
	display: flex;
	flex: none;
	flex-direction: column;
	gap: 6px;
	min-height: 84px;
	padding: 18px 16px;
	text-align: left;
	width: 100%;
}

.swid-cp--flow .swid-cp-size-card-label {
	font-size: 1.15rem;
	font-weight: 600;
}

.swid-cp-size-card-price {
	color: var( --swid-cp-gold );
	font-size: 0.98rem;
}

.swid-cp-styles-none,
.swid-cp-engraving-off {
	color: var( --swid-cp-muted );
	line-height: 1.5;
	margin: 0;
}

.swid-cp-preview-slot:empty {
	display: none;
}

/* Back and Continue. */
.swid-cp-nav {
	align-items: center;
	display: flex;
	gap: 12px;
	justify-content: space-between;
	margin: 4px 0 16px;
}

.swid-cp-nav-back,
.swid-cp-nav-next {
	border-radius: 999px;
	cursor: pointer;
	font: inherit;
	font-weight: 600;
	letter-spacing: 0.04em;
	min-height: 50px;
	padding: 12px 26px;
}

.swid-cp-nav-back {
	background: transparent;
	border: 1.5px solid var( --swid-cp-line-strong );
	color: var( --swid-cp-ink );
}

.swid-cp-nav-next {
	background: var( --swid-cp-gold );
	border: 1.5px solid var( --swid-cp-gold );
	color: #0b0a09;
	margin-left: auto;
}

.swid-cp-nav-next:disabled {
	cursor: not-allowed;
	opacity: 0.45;
}

.swid-cp-nav-back:focus-visible,
.swid-cp-nav-next:focus-visible {
	box-shadow: var( --swid-cp-focus );
	outline: none;
}

.swid-cp-messages-slot:empty {
	display: none;
}

/* The cart button, quantity and Woo's own variation price belong to the review step. */
form.swid-cp-flow-hold .single_add_to_cart_button,
form.swid-cp-flow-hold .quantity,
form.swid-cp-flow-hold .woocommerce-variation,
form.swid-cp-flow-hold .ct-cart-actions {
	display: none !important;
}

/* Step 6: an order-style summary. */
.swid-cp-summary-flow .swid-cp-summary-lines,
.swid-cp-summary-flow .swid-cp-summary-prices {
	display: grid;
	gap: 10px 16px;
	grid-template-columns: minmax( 96px, max-content ) minmax( 0, 1fr );
	margin: 0 0 14px;
}

.swid-cp-summary-flow dt {
	color: var( --swid-cp-muted );
	font-size: 0.82rem;
	letter-spacing: 0.06em;
	margin: 0;
	text-transform: uppercase;
}

.swid-cp-summary-flow dd {
	margin: 0;
	min-width: 0;
	overflow-wrap: anywhere;
}

.swid-cp-summary-flow .swid-cp-summary-formula {
	list-style: none;
	margin: 0;
	padding: 0;
}

.swid-cp-summary-flow .swid-cp-summary-formula li {
	margin: 0 0 4px;
}

.swid-cp-summary-flow .swid-cp-summary-prices {
	border-top: 1px solid var( --swid-cp-line );
	padding-top: 14px;
}

.swid-cp-summary-flow .swid-cp-summary-prices dd {
	text-align: right;
}

@media ( max-width: 600px ) {
	.swid-cp-progress {
		gap: 3px;
		margin-bottom: 12px;
	}

	.swid-cp-progress-number {
		font-size: 0.8rem;
		height: 26px;
		width: 26px;
	}

	.swid-cp-progress-label {
		font-size: 0.52rem;
		letter-spacing: 0;
	}

	.swid-cp--recipe .swid-cp-progress-label {
		font-size: 0.72rem;
		letter-spacing: 0.04em;
	}

	.swid-cp--flow .swid-cp-sizes {
		grid-template-columns: minmax( 0, 1fr );
	}

	.swid-cp--flow .swid-cp-size-card {
		align-items: center;
		flex-direction: row;
		justify-content: space-between;
		min-height: 64px;
	}

	.swid-cp-nav {
		gap: 10px;
	}

	.swid-cp-nav-back,
	.swid-cp-nav-next {
		flex: 1 1 0;
		padding: 12px 10px;
	}

	.swid-cp-nav-next {
		flex: 2 1 0;
	}
}

/* ══ The scent list: how much is showing, and how many may be chosen (1.6.1) ══ */

.swid-cp-oils-count {
	color: var( --swid-cp-muted );
	font-size: 0.9rem;
	line-height: 1.4;
	margin: 0 0 10px;
}

.swid-cp-oils-more {
	background: transparent;
	border: 1.5px solid var( --swid-cp-gold );
	border-radius: 999px;
	color: var( --swid-cp-gold );
	cursor: pointer;
	display: block;
	font: inherit;
	font-weight: 600;
	letter-spacing: 0.04em;
	margin: 14px auto 0;
	min-height: 48px;
	padding: 10px 28px;
}

.swid-cp-oils-more:hover:not( :disabled ) {
	background: var( --swid-cp-chosen );
}

.swid-cp-oils-more:disabled {
	cursor: progress;
	opacity: 0.6;
}

.swid-cp-oils-more:focus-visible {
	box-shadow: var( --swid-cp-focus );
	outline: none;
}

.swid-cp-pick-count {
	color: var( --swid-cp-muted );
	font-size: 0.9rem;
	line-height: 1.4;
	margin: 8px 0 0;
}

.swid-cp-pick-count.is-full {
	color: var( --swid-cp-warn );
}

.swid-cp-oil.is-capped {
	cursor: not-allowed;
	opacity: 0.45;
}

@media ( max-width: 600px ) {
	.swid-cp-oils-more {
		width: 100%;
	}
}

/* ══ A scent's notes and its number, on its card (1.6.2, reworked in 1.6.3) ══
 *
 * `.swid-cp-oil-item` wraps the card, its round (i) button and the notes. The
 * (i) lies over the card's top right corner, so a card with notes is exactly
 * the size of one without. A tap on it opens the notes under the card
 * (`is-open`). Where the device can hover, pointing at the scent floats the
 * same notes over the list without moving it.
 */

.swid-cp-oil-number {
	color: var( --swid-cp-gold );
	font-size: 0.95rem;
	font-variant-numeric: tabular-nums;
	font-weight: 600;
	letter-spacing: -0.01em;
}

.swid-cp-oil-media {
	position: relative;
}

.swid-cp-oil-number--badge {
	background: rgba( 14, 13, 12, 0.82 );
	border-radius: 6px 0 0 0;
	bottom: 0;
	font-size: 0.68rem;
	line-height: 1;
	padding: 3px 4px;
	position: absolute;
	right: 0;
}

.swid-cp-info-glyph {
	align-items: center;
	border: 1.5px solid currentColor;
	border-radius: 50%;
	display: inline-flex;
	font-family: Georgia, 'Times New Roman', serif;
	font-size: 0.78rem;
	font-style: italic;
	font-weight: 700;
	height: 18px;
	justify-content: center;
	line-height: 1;
	width: 18px;
}

.swid-cp-notes-hint {
	color: var( --swid-cp-muted );
	font-size: 0.85rem;
	margin: 0 0 10px;
}

.swid-cp-notes-hint .swid-cp-info-glyph {
	color: var( --swid-cp-gold );
	margin: 0 2px;
	vertical-align: -3px;
}

.swid-cp-oil-item {
	display: flex;
	flex-direction: column;
	min-width: 0;
	position: relative;
}

.swid-cp-oil-item > .swid-cp-oil {
	flex: 1 0 auto;
	width: 100%;
}

/* While a scent's notes are open under it, its neighbours in the row keep their own height instead of stretching. */
.swid-cp-grid:has( .swid-cp-oil-item.is-open ) > .swid-cp-oil,
.swid-cp-grid:has( .swid-cp-oil-item.is-open ) > .swid-cp-oil-item {
	align-self: start;
}

/* The (i) takes the top of the right-hand strip; the check mark of a chosen scent moves under it. */
.swid-cp-oil-item > .swid-cp-oil > .swid-cp-check {
	bottom: 8px;
	top: auto;
	transform: scale( 0.6 );
}

.swid-cp-oil-item > .swid-cp-oil.is-picked > .swid-cp-check {
	transform: none;
}

.swid-cp-oil-notes-toggle {
	align-items: center;
	background: transparent;
	border: 0;
	border-radius: 50%;
	color: var( --swid-cp-gold );
	cursor: pointer;
	display: inline-flex;
	height: 32px;
	justify-content: center;
	padding: 0;
	position: absolute;
	right: 5px;
	top: 2px;
	width: 32px;
	z-index: 2;
}

.swid-cp-oil-notes-toggle:hover,
.swid-cp-oil-item.is-open > .swid-cp-oil-notes-toggle {
	background: rgba( 255, 255, 255, 0.08 );
}

.swid-cp-oil-item.is-open > .swid-cp-oil-notes-toggle > .swid-cp-info-glyph {
	background: var( --swid-cp-gold );
	border-color: var( --swid-cp-gold );
	color: #141008;
}

.swid-cp-oil-notes-toggle:focus-visible {
	box-shadow: var( --swid-cp-focus );
	outline: none;
}

.swid-cp-oil-notes {
	background: var( --swid-cp-card );
	border: 1px solid var( --swid-cp-line );
	border-radius: var( --swid-cp-radius-sm );
	display: none;
	font-size: 0.88rem;
	gap: 4px 10px;
	grid-template-columns: max-content minmax( 0, 1fr );
	line-height: 1.4;
	margin: 4px 0;
	padding: 10px 12px;
}

.swid-cp-oil-notes dt {
	color: var( --swid-cp-muted );
	font-size: 0.76rem;
	letter-spacing: 0.06em;
	margin: 0;
	padding-top: 1px;
	text-transform: uppercase;
}

.swid-cp-oil-notes dd {
	color: var( --swid-cp-ink );
	margin: 0;
	min-width: 0;
	overflow-wrap: anywhere;
}

.swid-cp-oil-item.is-open > .swid-cp-oil-notes {
	display: grid;
}

@media ( hover: hover ) and ( pointer: fine ) {
	.swid-cp-oil-item:not( .is-open ):not( .is-dismissed ):hover > .swid-cp-oil-notes,
	.swid-cp-oil-item:not( .is-open ):not( .is-dismissed ) > .swid-cp-oil-notes-toggle:focus-visible + .swid-cp-oil-notes {
		box-shadow: 0 10px 28px rgba( 0, 0, 0, 0.55 );
		display: grid;
		left: 0;
		margin: 4px 0 0;
		position: absolute;
		right: 0;
		top: 100%;
		z-index: 6;
	}
}

/* One column of wide cards on a phone: a full-size tap target beside the check mark instead of above it. */
@media ( max-width: 480px ) {
	.swid-cp-oil-item > .swid-cp-oil {
		padding-right: 88px;
	}

	.swid-cp-oil-item > .swid-cp-oil > .swid-cp-check {
		bottom: auto;
		right: 54px;
		top: 50%;
		transform: translateY( -50% ) scale( 0.6 );
	}

	.swid-cp-oil-item > .swid-cp-oil.is-picked > .swid-cp-check {
		transform: translateY( -50% );
	}

	.swid-cp-oil-notes-toggle {
		height: 44px;
		right: 6px;
		top: 10px;
		width: 44px;
	}

	.swid-cp-oil-notes-toggle > .swid-cp-info-glyph {
		font-size: 0.9rem;
		height: 22px;
		width: 22px;
	}
}
