/* ==========================================================================
   3D Customiser - frontend styling
   --------------------------------------------------------------------------
   This file is organised in three sections, in this order:

     1. SHARED      - everything with no media query. The base look, and the
                      layout a phone gets before any override.
     2. DESKTOP     - every `@media (min-width: ...)` rule, in one place.
     3. MOBILE      - every `@media (max-width: ...)` rule, in one place.

   Order matters: mobile comes last so its overrides always win. When you add
   a rule, put it in the section it belongs to rather than next to a related
   rule in another section.
   ========================================================================== */

/* ==========================================================================
 *  1. SHARED
 *  No media query - applies at every width.
 * ========================================================================== */

/* ==========================================================================
   3D Customiser — frontend styling
   Two independent pieces, placed in two different theme slots:
     #devexhub-3d-customiser-gallery  -> replaces the default WooCommerce product image (left)
     #devexhub-3d-customiser-panel    -> sits above Add to Cart, in the summary column (right)
   ========================================================================== */
#devexhub-3d-customiser-gallery,
#devexhub-3d-customiser-panel {
	--devexhub-3d-customiser-ink: #1f2a44;
	--devexhub-3d-customiser-ink-soft: #4a5468;
	--devexhub-3d-customiser-line: #e5e7ec;
	--devexhub-3d-customiser-surface: #f7f7f9;
	--devexhub-3d-customiser-accent: #1f2a44;
	--devexhub-3d-customiser-radius: 14px;
	box-sizing: border-box;
}

#devexhub-3d-customiser-gallery *,
#devexhub-3d-customiser-panel * {
	box-sizing: border-box;
}

/* Some themes render the product image via a native block (a separate
   render path from the classic gallery hook we replace below) — hide that
   leftover placeholder wherever our customizer has taken over the page.
   Full-Customise ONLY: Semi-Customise keeps the product's real photo
   gallery showing right up until the Customise popup is opened, so it
   must NOT be hidden there. */
body.devexhub-3d-customiser-full-active:not(.devexhub-3d-studio) .wp-block-woocommerce-product-image-gallery,
body.devexhub-3d-customiser-full-active:not(.devexhub-3d-studio) .woocommerce-product-gallery {
	display: none !important;
}

/* -- Gallery / canvas (left column) -------------------------------------- */
#devexhub-3d-customiser-gallery {
	width: 100%;
	max-width: 560px;
	margin: 0 auto 8px;
}

/* Zoom pill above the canvas — a couple of discrete steps on the same
   dolly OrbitControls already does on scroll/pinch (see applyZoomStep()
   in customizer.js), plus a readout, matching the reference's "− 100% +"
   control. */
#devexhub-3d-customiser-zoom {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin-bottom: 10px;
}

#devexhub-3d-customiser-zoom button {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	border: 1px solid var(--devexhub-3d-customiser-line);
	background: #fff;
	color: var(--devexhub-3d-customiser-ink);
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
}

#devexhub-3d-customiser-zoom button:hover {
	border-color: var(--devexhub-3d-customiser-accent);
}

#devexhub-3d-customiser-zoom-level {
	min-width: 44px;
	text-align: center;
	font-size: 12px;
	font-weight: 700;
	color: var(--devexhub-3d-customiser-ink-soft);
	background: var(--devexhub-3d-customiser-surface);
	border-radius: 999px;
	padding: 6px 10px;
}

#devexhub-3d-customiser-canvas-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	background: radial-gradient(circle at 50% 30%, #fbfbfc 0%, #eef0f3 100%);
	border-radius: var(--devexhub-3d-customiser-radius);
	overflow: hidden;
	border: 1px solid var(--devexhub-3d-customiser-line);
}

#devexhub-3d-customiser-canvas {
	width: 100%;
	height: 100%;
	display: block;
	cursor: grab;
}

#devexhub-3d-customiser-canvas:active {
	cursor: grabbing;
}

.devexhub-3d-customiser-badge {
	position: absolute;
	top: 14px;
	left: 14px;
	z-index: 2;
	background: rgba(255, 255, 255, 0.9);
	backdrop-filter: blur(4px);
	color: var(--devexhub-3d-customiser-ink);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.02em;
	padding: 6px 12px;
	border-radius: 999px;
	box-shadow: 0 1px 3px rgba(20, 20, 30, 0.08);
	pointer-events: none;
}

#devexhub-3d-customiser-loading {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	color: var(--devexhub-3d-customiser-ink-soft);
	font-size: 14px;
	background: var(--devexhub-3d-customiser-surface);
}

.devexhub-3d-customiser-spinner {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 3px solid var(--devexhub-3d-customiser-line);
	border-top-color: var(--devexhub-3d-customiser-accent);
	animation: devexhub-3d-customiser-spin 0.8s linear infinite;
}

@keyframes devexhub-3d-customiser-spin {
	to {
		transform: rotate(360deg);
	}
}

/* One-line nudge under Add to Cart (render_cart_hint() in the PHP class) */
#devexhub-3d-customiser-cart-hint {
	margin: 8px 0 0;
	font-size: 12px;
	text-align: center;
	color: var(--devexhub-3d-customiser-ink-soft);
}

/* -- Options panel (right column) ---------------------------------------- */
#devexhub-3d-customiser-panel {
	max-width: 560px;
	margin: 20px auto 4px;
	padding: 20px 22px;
	background: #fff;
	border: 1px solid var(--devexhub-3d-customiser-line);
	border-radius: var(--devexhub-3d-customiser-radius);
	box-shadow: 0 10px 30px rgba(31, 42, 68, 0.06);
	/* WooCommerce's own "Add to Cart with Options" block renders the
	   quantity input and button as a CSS grid row, and our panel is
	   injected (via woocommerce_before_add_to_cart_button) as a sibling
	   inside that same grid — without this it gets squeezed into a single
	   grid cell alongside the quantity box instead of spanning full width.
	   Harmless on parents that aren't a grid at all. */
	grid-column: 1 / -1;
}

#devexhub-3d-customiser-mobile-bar {
	grid-column: 1 / -1;
}

/* On a real two-column theme (classic float layout: div.images / div.summary
   sitting side by side), the gallery and panel are no longer full-bleed
   siblings in one flow column — let each simply fill its own column. */
.woocommerce div.summary #devexhub-3d-customiser-panel,
.woocommerce div.images #devexhub-3d-customiser-gallery {
	max-width: none;
	margin-left: 0;
	margin-right: 0;
}

/* Block/FSE themes (Twenty Twenty-Five etc.): our JS moves #devexhub-3d-customiser-gallery
   into the native image-gallery column of the theme's own two-column
   grid (`.devexhub-3d-customiser-relocated` is added to <body> when that happens) — so here
   too the gallery should fill its column edge-to-edge instead of being
   capped/centered like it is in the old single-column stacked layout. */
body.devexhub-3d-customiser-relocated #devexhub-3d-customiser-gallery {
	max-width: none;
	margin: 0 0 8px;
}

body.devexhub-3d-customiser-relocated #devexhub-3d-customiser-panel {
	max-width: none;
	margin-left: 0;
	margin-right: 0;
}

/* Make the gallery's column a positioning context so a sticky canvas
   (below) has something to stick within, and give the grid a touch of
   breathing room between the two columns. */
body.devexhub-3d-customiser-relocated .wp-block-columns > .wp-block-column:has(#devexhub-3d-customiser-gallery) {
	display: flex;
	flex-direction: column;
}

/* Plain-language "how this works" banner, shown once above step 1 — the
   goal is that a first-time shopper never has to guess what the panel
   below does or that the 3D model reacts to their choices. */
.devexhub-3d-customiser-intro {
	background: var(--devexhub-3d-customiser-surface);
	border: 1px solid var(--devexhub-3d-customiser-line);
	border-radius: calc(var(--devexhub-3d-customiser-radius) - 4px);
	padding: 14px 16px;
	margin-bottom: 20px;
}

.devexhub-3d-customiser-intro strong {
	display: block;
	font-size: 13px;
	font-weight: 700;
	color: var(--devexhub-3d-customiser-ink);
	margin-bottom: 4px;
}

.devexhub-3d-customiser-intro p {
	margin: 0;
	font-size: 13px;
	line-height: 1.5;
	color: var(--devexhub-3d-customiser-ink-soft);
}

/* -- Step nav (Fit / Colour / Add-ons / Text / Finalize) ------------------
   Replaces the old single scrolling list with an app-style set of steps:
   a row of buttons above, one panel visible at a time below. Only the
   active button/panel gets is-active-step-btn / is-active-step — plain
   class toggles in customizer.js, no layout math. */
#devexhub-3d-customiser-steps {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 18px;
	padding-bottom: 18px;
	border-bottom: 1px solid var(--devexhub-3d-customiser-line);
}

.devexhub-3d-customiser-step-btn {
	appearance: none;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	border: 1px solid var(--devexhub-3d-customiser-line);
	background: var(--devexhub-3d-customiser-surface);
	color: var(--devexhub-3d-customiser-ink-soft);
	padding: 8px 14px;
	border-radius: 14px;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.devexhub-3d-customiser-step-btn-label {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.devexhub-3d-customiser-step-btn-required {
	font-size: 9px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #d1453b;
}

.devexhub-3d-customiser-step-btn:hover {
	border-color: var(--devexhub-3d-customiser-accent);
	color: var(--devexhub-3d-customiser-ink);
}

.devexhub-3d-customiser-step-btn.is-active-step-btn {
	background: var(--devexhub-3d-customiser-accent);
	border-color: var(--devexhub-3d-customiser-accent);
	color: #fff;
}

.devexhub-3d-customiser-step-btn.is-active-step-btn .devexhub-3d-customiser-step-btn-required {
	color: #ffb4af;
}

.devexhub-3d-customiser-step-panel {
	display: none;
}

.devexhub-3d-customiser-step-panel.is-active-step {
	display: block;
	animation: devexhub-3d-customiser-step-fade 0.2s ease;
}

@keyframes devexhub-3d-customiser-step-fade {
	from {
		opacity: 0;
		transform: translateY(4px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

/* Inside a step panel, sections no longer need their own divider/step
   number — the step nav button already carries that role. */
.devexhub-3d-customiser-step-panel .devexhub-3d-customiser-panel-section:last-of-type {
	border-bottom: none;
	margin-bottom: 4px;
	padding-bottom: 0;
}

.devexhub-3d-customiser-panel-section {
	padding-bottom: 18px;
	margin-bottom: 18px;
	border-bottom: 1px solid var(--devexhub-3d-customiser-line);
}

.devexhub-3d-customiser-panel-section:last-of-type {
	border-bottom: none;
	margin-bottom: 4px;
	padding-bottom: 0;
}

.devexhub-3d-customiser-panel-section h4 {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 14px;
	font-size: 16px;
	font-weight: 700;
	text-transform: none;
	letter-spacing: 0;
	color: var(--devexhub-3d-customiser-ink);
}

.devexhub-3d-customiser-step {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--devexhub-3d-customiser-accent);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	flex: none;
}

.devexhub-3d-customiser-optional {
	text-transform: none;
	font-weight: 400;
	color: #9298a6;
	letter-spacing: 0;
	font-size: 12px;
}

/* Zone menu — one full-width row per zone (Contrast Color - Cuffs, Main
   Color, etc), each showing its current pick and turning green once one
   is made. Tapping a row opens the zone detail view below. */
#devexhub-3d-customiser-zone-tabs {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.devexhub-3d-customiser-zone-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--devexhub-3d-customiser-line);
	background: var(--devexhub-3d-customiser-surface);
	border-radius: 10px;
	cursor: pointer;
	text-align: left;
	transition: all 0.15s ease;
}

.devexhub-3d-customiser-zone-row:hover {
	border-color: var(--devexhub-3d-customiser-accent);
}

.devexhub-3d-customiser-zone-row-label {
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--devexhub-3d-customiser-ink);
}

.devexhub-3d-customiser-zone-row-value {
	font-size: 12px;
	color: var(--devexhub-3d-customiser-ink-soft);
}

.devexhub-3d-customiser-zone-row.is-complete {
	background: #eefaf1;
	border-color: #8fd4a3;
}

.devexhub-3d-customiser-zone-row.is-complete .devexhub-3d-customiser-zone-row-value {
	color: #2f8a4d;
	font-weight: 600;
}

/* Zone detail — the drill-down swatch view for one zone at a time. */
/* Heading row: zone name on the left, the two icon actions on the right. */
.devexhub-3d-customiser-zone-detail-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
}

#devexhub-3d-customiser-zone-detail-title {
	margin: 0;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--devexhub-3d-customiser-ink);
}

/* The "you're about to pick this" strip — updates live as swatches are
   clicked, same idea as the reference's bottom preview bar. */
#devexhub-3d-customiser-zone-preview {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-top: 14px;
	padding: 10px 14px;
	background: var(--devexhub-3d-customiser-surface);
	border: 1px solid var(--devexhub-3d-customiser-line);
	border-radius: 10px;
}

#devexhub-3d-customiser-zone-preview-name {
	font-size: 13px;
	font-weight: 700;
	color: var(--devexhub-3d-customiser-ink);
}

#devexhub-3d-customiser-zone-preview-price {
	font-size: 12px;
	font-weight: 600;
	color: var(--devexhub-3d-customiser-accent);
}

/* Cancel / Done — Cancel restores whatever this zone had before the
   detail view opened (or clears it, if nothing did); Done just keeps
   whatever's currently showing. See onZoneCancel()/onZoneDone() in
   customizer.js. */
.devexhub-3d-customiser-zone-actions {
	display: flex;
	gap: 8px;
	flex: 0 0 auto;
}

/* Square icon buttons, sized to stay a comfortable tap target even though
   they now carry a glyph instead of a word. */
.devexhub-3d-customiser-zone-action-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border-radius: 8px;
	border: 1.5px solid var(--devexhub-3d-customiser-line);
	background: #fff;
	font-size: 14px;
	line-height: 1;
	font-weight: 700;
	cursor: pointer;
	transition: all 0.15s ease;
}

.devexhub-3d-customiser-zone-action-cancel {
	color: var(--devexhub-3d-customiser-ink-soft);
}

.devexhub-3d-customiser-zone-action-cancel:hover {
	border-color: #d1453b;
	color: #d1453b;
}

.devexhub-3d-customiser-zone-action-done {
	background: var(--devexhub-3d-customiser-accent);
	border-color: var(--devexhub-3d-customiser-accent);
	color: #fff;
}

.devexhub-3d-customiser-zone-action-done:hover {
	opacity: 0.9;
}

/* Zone color swatch cards — the "visible price" upgrade */
/* The container is now a plain block: it holds the colour filter row and
   one .devexhub-3d-customiser-swatch-grid per material type, so the grid
   layout moved down onto those sections (see the colour-filter block near
   the end of this file). Leaving `display:grid` here would have laid the
   filter row out as a grid cell alongside the swatches. */
#devexhub-3d-customiser-zone-options {
	display: block;
}

.devexhub-3d-customiser-swatch-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 8px 4px;
	background: transparent;
	border: 1.5px solid transparent;
	border-radius: 12px;
	cursor: pointer;
	transition: all 0.15s ease;
}

.devexhub-3d-customiser-swatch-card:hover .devexhub-3d-customiser-swatch-dot {
	transform: translateY(-1px);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08), 0 4px 10px rgba(31, 42, 68, 0.14);
}

.devexhub-3d-customiser-swatch-card.is-active {
	background: transparent;
	box-shadow: none;
}

.devexhub-3d-customiser-swatch-dot {
	width: 52px;
	height: 52px;
	border-radius: 14px;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.1);
	transition: all 0.15s ease;
}

.devexhub-3d-customiser-swatch-card.is-active .devexhub-3d-customiser-swatch-dot {
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08), 0 0 0 2px #fff, 0 0 0 4px var(--devexhub-3d-customiser-accent);
}

.devexhub-3d-customiser-swatch-label {
	font-size: 12px;
	font-weight: 600;
	color: var(--devexhub-3d-customiser-ink);
	line-height: 1.2;
}

.devexhub-3d-customiser-swatch-price {
	font-size: 11px;
	color: #9298a6;
	line-height: 1.2;
}

.devexhub-3d-customiser-swatch-card.is-active .devexhub-3d-customiser-swatch-price {
	color: var(--devexhub-3d-customiser-accent);
	font-weight: 600;
}

/* Fabric-pattern swatches — a real pattern thumbnail instead of a flat
   tint, matching boxxerworld's "MATERIAL" swatches sitting alongside the
   flat "COLOUR FILTER" ones in the same zone. */
.devexhub-3d-customiser-swatch-card.is-fabric .devexhub-3d-customiser-swatch-dot {
	background-size: cover;
	background-position: center;
}

/* A color with its own material/finish drill-down (e.g. Black comes in
   Croc/Snake/Plain) — the " ›" in its label is enough of a hint, this just
   nudges the swatch card itself so it doesn't look identical to a plain,
   one-tap color. */
.devexhub-3d-customiser-swatch-card.has-materials {
	border-color: rgba(0, 0, 0, 0.08);
}

/* "‹ Colors" back row inside a color's own materials grid — a full-width
   row above the material swatches, not a swatch card itself. */
.devexhub-3d-customiser-material-back {
	grid-column: 1 / -1;
	text-align: left;
	background: none;
	border: none;
	padding: 4px 2px 8px;
	margin: 0;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--devexhub-3d-customiser-accent);
	cursor: pointer;
}

.devexhub-3d-customiser-material-back:hover {
	text-decoration: underline;
}

/* Material / crystal option chips (Production speed, Text color etc. —
   anything NOT inside #devexhub-3d-customiser-crystal-options / 
   #devexhub-3d-customiser-sleeve-options keeps this plain pill style). */
#devexhub-3d-customiser-material-options {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.devexhub-3d-customiser-option-btn {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 8px 14px;
	border: 1.5px solid var(--devexhub-3d-customiser-line);
	background: #fff;
	color: var(--devexhub-3d-customiser-ink-soft);
	border-radius: 999px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 500;
	transition: all 0.15s ease;
}

.devexhub-3d-customiser-option-btn:hover {
	border-color: var(--devexhub-3d-customiser-accent);
	color: var(--devexhub-3d-customiser-ink);
}

.devexhub-3d-customiser-option-btn.is-active {
	background: var(--devexhub-3d-customiser-accent);
	border-color: var(--devexhub-3d-customiser-accent);
	color: #fff;
}

.devexhub-3d-customiser-option-swatch {
	width: 14px;
	height: 14px;
	border-radius: 50%;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
	flex: none;
}

.devexhub-3d-customiser-option-price {
	font-size: 11px;
	opacity: 0.75;
}

/* Crystals & Sleeves — icon tile grid (matches the reference: a square
   swatch/icon on top, name + price underneath, selected item gets a
   ring instead of a filled pill). */
#devexhub-3d-customiser-crystal-options,
#devexhub-3d-customiser-sleeve-options {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
	gap: 12px;
}

#devexhub-3d-customiser-crystal-options .devexhub-3d-customiser-option-btn,
#devexhub-3d-customiser-sleeve-options .devexhub-3d-customiser-option-btn {
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	gap: 7px;
	padding: 10px 6px 8px;
	border-radius: 14px;
	border-color: transparent;
	background: transparent;
	text-align: center;
	font-weight: 600;
}

#devexhub-3d-customiser-crystal-options .devexhub-3d-customiser-option-btn:hover,
#devexhub-3d-customiser-sleeve-options .devexhub-3d-customiser-option-btn:hover {
	background: var(--devexhub-3d-customiser-surface);
}

#devexhub-3d-customiser-crystal-options .devexhub-3d-customiser-option-btn.is-active,
#devexhub-3d-customiser-sleeve-options .devexhub-3d-customiser-option-btn.is-active {
	background: transparent;
	color: var(--devexhub-3d-customiser-ink);
}

#devexhub-3d-customiser-crystal-options .devexhub-3d-customiser-option-name,
#devexhub-3d-customiser-sleeve-options .devexhub-3d-customiser-option-name {
	font-size: 12px;
	line-height: 1.2;
}

#devexhub-3d-customiser-crystal-options .devexhub-3d-customiser-option-price,
#devexhub-3d-customiser-sleeve-options .devexhub-3d-customiser-option-price {
	font-size: 10.5px;
}

#devexhub-3d-customiser-crystal-options .devexhub-3d-customiser-option-swatch,
#devexhub-3d-customiser-sleeve-options .devexhub-3d-customiser-option-icon {
	width: 48px;
	height: 48px;
	border-radius: 13px;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.08);
	transition: all 0.15s ease;
}

#devexhub-3d-customiser-sleeve-options .devexhub-3d-customiser-option-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--devexhub-3d-customiser-surface);
	color: var(--devexhub-3d-customiser-ink-soft);
}

#devexhub-3d-customiser-sleeve-options .devexhub-3d-customiser-option-icon svg {
	width: 26px;
	height: 26px;
}

#devexhub-3d-customiser-crystal-options .devexhub-3d-customiser-option-btn.is-active .devexhub-3d-customiser-option-swatch,
#devexhub-3d-customiser-sleeve-options .devexhub-3d-customiser-option-btn.is-active .devexhub-3d-customiser-option-icon {
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08), 0 0 0 2px #fff, 0 0 0 4px var(--devexhub-3d-customiser-accent);
}

#devexhub-3d-customiser-sleeve-options .devexhub-3d-customiser-option-btn.is-active .devexhub-3d-customiser-option-icon {
	color: var(--devexhub-3d-customiser-accent);
	background: #fff;
}

/* Custom text */
.devexhub-3d-customiser-text-hint {
	margin: -4px 0 10px;
	font-size: 12.5px;
	color: #9298a6;
}

.devexhub-3d-customiser-text-input-wrap {
	position: relative;
	max-width: 320px;
}

#devexhub-3d-customiser-text-input {
	width: 100%;
	padding: 10px 56px 10px 12px;
	border: 1.5px solid var(--devexhub-3d-customiser-line);
	border-radius: 8px;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	transition: border-color 0.15s ease;
}

#devexhub-3d-customiser-text-input:focus {
	outline: none;
	border-color: var(--devexhub-3d-customiser-accent);
}

#devexhub-3d-customiser-text-count {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 11px;
	color: #b0b5c0;
	pointer-events: none;
}

.devexhub-3d-customiser-text-color-row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 14px;
}

.devexhub-3d-customiser-text-color-label {
	font-size: 12.5px;
	font-weight: 600;
	color: var(--devexhub-3d-customiser-ink-soft);
}

#devexhub-3d-customiser-text-color-options {
	display: flex;
	align-items: center;
	gap: 8px;
}

.devexhub-3d-customiser-textcolor-dot {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	border: none;
	padding: 0;
	cursor: pointer;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
	transition: box-shadow 0.15s ease;
}

.devexhub-3d-customiser-textcolor-dot:hover {
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15), 0 0 0 2px rgba(31, 42, 68, 0.15);
}

.devexhub-3d-customiser-textcolor-dot.is-active {
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15), 0 0 0 2px #fff, 0 0 0 3px var(--devexhub-3d-customiser-accent);
}

.devexhub-3d-customiser-textcolor-native {
	width: 26px;
	height: 26px;
	border: none;
	border-radius: 50%;
	padding: 0;
	cursor: pointer;
	background: none;
	margin-left: 2px;
}

.devexhub-3d-customiser-textcolor-native::-webkit-color-swatch-wrapper {
	padding: 0;
	border-radius: 50%;
}

.devexhub-3d-customiser-textcolor-native::-webkit-color-swatch {
	border: 2px solid var(--devexhub-3d-customiser-line);
	border-radius: 50%;
}

.devexhub-3d-customiser-textcolor-native::-moz-color-swatch {
	border: 2px solid var(--devexhub-3d-customiser-line);
	border-radius: 50%;
}

.devexhub-3d-customiser-text-size-row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 14px;
}

.devexhub-3d-customiser-text-size-row input[type='range'] {
	flex: 1;
	max-width: 220px;
	accent-color: var(--devexhub-3d-customiser-accent);
}

#devexhub-3d-customiser-message {
	width: 100%;
	max-width: 420px;
	resize: vertical;
	padding: 10px 12px;
	border: 1.5px solid var(--devexhub-3d-customiser-line);
	border-radius: 8px;
	font-size: 13.5px;
	font-family: inherit;
	color: var(--devexhub-3d-customiser-ink);
	transition: border-color 0.15s ease;
}

#devexhub-3d-customiser-message:focus {
	outline: none;
	border-color: var(--devexhub-3d-customiser-accent);
}

#devexhub-3d-customiser-message-count {
	display: block;
	margin-top: 4px;
	font-size: 11px;
	color: #b0b5c0;
}

.devexhub-3d-customiser-text-rotation-presets {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 8px;
}

.devexhub-3d-customiser-text-rotation-btn {
	appearance: none;
	padding: 6px 12px;
	border: 1.5px solid var(--devexhub-3d-customiser-line);
	background: #fff;
	color: var(--devexhub-3d-customiser-ink-soft);
	border-radius: 999px;
	cursor: pointer;
	font-size: 12px;
	font-weight: 500;
	transition: all 0.15s ease;
}

.devexhub-3d-customiser-text-rotation-btn:hover {
	border-color: var(--devexhub-3d-customiser-accent);
	color: var(--devexhub-3d-customiser-ink);
}

.devexhub-3d-customiser-text-drag-hint {
	margin: 12px 0 0;
	display: flex;
	align-items: center;
	gap: 6px;
}

.devexhub-3d-customiser-text-drag-hint::before {
	content: '✥';
	color: var(--devexhub-3d-customiser-accent);
	font-size: 13px;
}

/* Running summary + total */
#devexhub-3d-customiser-summary {
	margin-top: 4px;
	padding-top: 16px;
	border-top: 2px solid var(--devexhub-3d-customiser-ink);
}

#devexhub-3d-customiser-summary-rows {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-bottom: 10px;
}

.devexhub-3d-customiser-summary-row {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	font-size: 12.5px;
	color: var(--devexhub-3d-customiser-ink-soft);
}

.devexhub-3d-customiser-summary-row .devexhub-3d-customiser-summary-amount {
	flex: none;
	color: var(--devexhub-3d-customiser-ink);
	font-weight: 600;
}

#devexhub-3d-customiser-summary-total {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
}

#devexhub-3d-customiser-summary-total span {
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--devexhub-3d-customiser-ink-soft);
}

#devexhub-3d-customiser-total-price {
	font-size: 24px;
	font-weight: 700;
	color: var(--devexhub-3d-customiser-ink);
}

/* -- Mobile sticky bar (Total + Add to Cart) -------------------------------
   Hidden by default (desktop keeps the normal in-panel total + WooCommerce's
   own Add to Cart button); shown fixed to the bottom of the screen under the
   mobile breakpoint below, where it takes over as the actual submit control. */
#devexhub-3d-customiser-mobile-bar {
	display: none;
	/* Sits as a sibling of #devexhub-3d-customiser-panel (after the hidden
	   cart fields), not a descendant, so it needs its own copy of the ink
	   colors rather than inheriting the panel's custom properties. */
	--devexhub-3d-customiser-ink: #1f2a44;
	--devexhub-3d-customiser-ink-soft: #4a5468;
	box-sizing: border-box;
}

#devexhub-3d-customiser-mobile-bar * {
	box-sizing: border-box;
}

/* -- Size chart link + modal ------------------------------------------------ */
.devexhub-3d-customiser-size-chart-link {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 5;
	background: rgba(255, 255, 255, 0.92);
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 999px;
	padding: 6px 14px;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.devexhub-3d-customiser-size-chart-link:hover {
	background: #fff;
}

#devexhub-3d-customiser-size-chart-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(0, 0, 0, 0.6);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

#devexhub-3d-customiser-size-chart-modal .devexhub-3d-customiser-modal-box {
	position: relative;
	background: #fff;
	border-radius: 10px;
	padding: 20px;
	max-width: 90vw;
	max-height: 90vh;
	overflow: auto;
}

#devexhub-3d-customiser-size-chart-modal .devexhub-3d-customiser-modal-close {
	position: absolute;
	top: 6px;
	right: 10px;
	background: none;
	border: none;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	color: #444;
}

#devexhub-3d-customiser-size-chart-image {
	display: block;
	max-width: 100%;
	height: auto;
}

/* -- Production options + game day date ------------------------------------ */
#devexhub-3d-customiser-production-options {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 10px;
}

#devexhub-3d-customiser-gameday-row {
	margin-top: 6px;
}

#devexhub-3d-customiser-gameday-date {
	display: block;
	width: 100%;
	max-width: 220px;
	padding: 8px 10px;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 6px;
	font-size: 13px;
	margin-top: 4px;
}

/* -- Body measurements (Fit step) ------------------------------------------ */
.devexhub-3d-customiser-body-row {
	display: flex;
	gap: 14px;
	flex-wrap: wrap;
}

.devexhub-3d-customiser-body-field {
	flex: 1;
	min-width: 120px;
}

.devexhub-3d-customiser-body-field label {
	display: block;
	margin-bottom: 4px;
}

.devexhub-3d-customiser-body-field input[type='number'] {
	display: block;
	width: 100%;
	padding: 8px 10px;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 6px;
	font-size: 13px;
}

.devexhub-3d-customiser-body-field input[type='number']:focus {
	outline: none;
	border-color: var(--devexhub-3d-customiser-accent);
}

#devexhub-3d-customiser-gameday-hint {
	margin: 6px 0 0;
	font-size: 11.5px;
}

/* Add to Cart validation — see getMissingSelections()/showValidationErrors()
   in customizer.js and the #devexhub-3d-customiser-validation-errors markup
   in render_options_panel(). */
.devexhub-3d-customiser-validation-errors {
	margin: 14px 0;
	padding: 12px 14px;
	background: #fdf2f2;
	border: 1px solid #e2a1a1;
	border-left: 4px solid #c0392b;
	border-radius: 6px;
}

.devexhub-3d-customiser-validation-title {
	margin: 0 0 6px;
	font-size: 13px;
	font-weight: 600;
	color: #8f1f1f;
}

.devexhub-3d-customiser-validation-errors ul {
	margin: 0;
	padding-left: 18px;
	font-size: 12.5px;
	color: #8f1f1f;
}

.devexhub-3d-customiser-validation-errors li {
	margin: 2px 0;
}

/* Step nav button flagged by refreshValidationIfShown()/showValidationErrors()
   as having something required still missing. */
.devexhub-3d-customiser-step-btn.has-error {
	border-color: #c0392b;
}

.devexhub-3d-customiser-step-btn.has-error .devexhub-3d-customiser-step-btn-label {
	color: #c0392b;
}

.devexhub-3d-customiser-step-btn.has-error .devexhub-3d-customiser-step-btn-required {
	color: #c0392b;
}

.devexhub-3d-customiser-step-btn.has-error.is-active-step-btn {
	border-color: #c0392b;
	background: #c0392b;
}

.devexhub-3d-customiser-step-btn.has-error.is-active-step-btn .devexhub-3d-customiser-step-btn-label,
.devexhub-3d-customiser-step-btn.has-error.is-active-step-btn .devexhub-3d-customiser-step-btn-required {
	color: #fff;
}

/* ------------------------------------------------------------------ */
/* First-time onboarding tour                                         */
/* ------------------------------------------------------------------ */
.devexhub-3d-customiser-tour-overlay {
	position: fixed;
	inset: 0;
	z-index: 100010;
	pointer-events: none;
}

.devexhub-3d-customiser-tour-spotlight {
	position: fixed;
	box-shadow: 0 0 0 9999px rgba(15, 20, 35, 0.6);
	border: 2px solid #fff;
	border-radius: 10px;
	pointer-events: none;
	transition: top 0.35s ease, left 0.35s ease, width 0.35s ease, height 0.35s ease;
}

.devexhub-3d-customiser-tour-tooltip {
	position: fixed;
	pointer-events: auto;
	width: 280px;
	max-width: calc(100vw - 32px);
	background: #fff;
	color: var(--devexhub-3d-customiser-ink);
	border-radius: var(--devexhub-3d-customiser-radius);
	box-shadow: 0 12px 32px rgba(15, 20, 35, 0.28);
	padding: 16px 18px;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.devexhub-3d-customiser-tour-tooltip.is-visible {
	opacity: 1;
}

.devexhub-3d-customiser-tour-step-count {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--devexhub-3d-customiser-ink-soft);
	margin-bottom: 6px;
}

.devexhub-3d-customiser-tour-title {
	margin: 0 0 6px;
	font-size: 15px;
	font-weight: 700;
	color: var(--devexhub-3d-customiser-ink);
}

.devexhub-3d-customiser-tour-text {
	margin: 0 0 14px;
	font-size: 13px;
	line-height: 1.5;
	color: var(--devexhub-3d-customiser-ink-soft);
}

.devexhub-3d-customiser-tour-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.devexhub-3d-customiser-tour-skip {
	background: none;
	border: none;
	padding: 0;
	font-size: 12px;
	font-weight: 600;
	color: var(--devexhub-3d-customiser-ink-soft);
	cursor: pointer;
	text-decoration: underline;
}

.devexhub-3d-customiser-tour-next {
	background: var(--devexhub-3d-customiser-accent);
	border: 1px solid var(--devexhub-3d-customiser-accent);
	color: #fff;
	border-radius: 999px;
	padding: 8px 18px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}

.devexhub-3d-customiser-tour-help-btn {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 99998;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1px solid var(--devexhub-3d-customiser-line);
	background: #fff;
	color: var(--devexhub-3d-customiser-ink);
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 6px 18px rgba(15, 20, 35, 0.18);
}

.devexhub-3d-customiser-tour-help-btn:hover {
	border-color: var(--devexhub-3d-customiser-accent);
	color: var(--devexhub-3d-customiser-accent);
}

/* -- Customise toggle button + collapsed sidebar ------------------------- */
.devexhub-3d-customiser-customise-toggle {
	position: absolute;
	z-index: 5;
	right: 14px;
	bottom: 14px;
	padding: 12px 22px;
	border: none;
	border-radius: 999px;
	background: var(--devexhub-3d-customiser-accent);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.02em;
	cursor: pointer;
	box-shadow: 0 6px 18px rgba(31, 42, 68, 0.28);
}

.devexhub-3d-customiser-customise-toggle:hover {
	filter: brightness(1.1);
}

#devexhub-3d-customiser-panel.devexhub-3d-customiser-panel-collapsed {
	display: none !important;
}

#devexhub-3d-customiser-resume-banner {
  position: relative;
  max-width: 100%;
  padding: 12px 14px;
  background: #444;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  box-shadow: 0 3px 12px rgba(0,0,0,.08);
  font-size: 13px;
  color: #fff;
  margin-bottom: 12px;
}

#devexhub-3d-customiser-resume-banner span {
  display: block;
  margin-bottom: 9px;
  padding-right: 18px;
  line-height: 1.4;
}

#devexhub-3d-customiser-resume-new {
  padding: 6px 11px;
  border: 0;
  border-radius: 5px;
  background: #fff;
  color: #111;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

#devexhub-3d-customiser-resume-new:hover {
  background: #fff;
}

#devexhub-3d-customiser-resume-dismiss {
  position: absolute;
  top: 5px;
  right: 7px;
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}
/* -- Semi-Customise: standalone Customise button + two-column popup ------ */

/* Visible to every shopper, right before Add to Cart -- NOT hidden behind
   any toggle, since everyone should be able to find it. */
.devexhub-3d-customiser-customise-btn {
	display: block;
	width: 100%;
	margin-bottom: 10px;
	padding: 13px 18px;
	border: 1px solid var(--devexhub-3d-customiser-ink, #1f2a44);
	border-radius: 10px;
	background: #fff;
	color: var(--devexhub-3d-customiser-ink, #1f2a44);
	font-weight: 600;
	font-size: 15px;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.devexhub-3d-customiser-customise-btn:hover {
	background: var(--devexhub-3d-customiser-ink, #1f2a44);
	color: #fff;
}

#devexhub-3d-customiser-popup-backdrop {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(15, 20, 35, 0.55);
	z-index: 40;
}

body.devexhub-3d-customiser-popup-open #devexhub-3d-customiser-popup-backdrop {
	display: block;
}

/* The popup itself: a centered box holding two columns -- the 3D model
   (left) and the customisation options (right), exactly like the Full-
   Customise inline layout, just inside a modal instead of on the page. */
#devexhub-3d-customiser-semi-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 50;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

body.devexhub-3d-customiser-popup-open #devexhub-3d-customiser-semi-modal {
	display: flex;
}

.devexhub-3d-customiser-semi-modal-box {
	position: relative;
	display: flex;
	align-items: stretch;
	background: #fff;
	border-radius: var(--devexhub-3d-customiser-radius, 14px);
	width: min(960px, 96vw);
	max-height: 90vh;
	overflow: hidden;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.devexhub-3d-customiser-semi-modal-model {
	flex: 1 1 50%;
	min-width: 0;
	padding: 20px;
	overflow-y: auto;
	background: var(--devexhub-3d-customiser-surface, #f7f7f9);
}

.devexhub-3d-customiser-semi-modal-model #devexhub-3d-customiser-gallery {
	max-width: none;
	margin: 0;
}

.devexhub-3d-customiser-semi-modal-options {
	flex: 1 1 50%;
	min-width: 0;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border-left: 1px solid var(--devexhub-3d-customiser-line, #e5e7ec);
}

.devexhub-3d-customiser-semi-modal-options #devexhub-3d-customiser-panel {
	width: 100%;
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	margin: 20px auto 0;
}

/* Always-visible Add to Cart bar, pinned to the bottom of the popup's
   options column (outside the scrollable panel above it) -- this is what
   a semi-customise shopper actually uses to buy while the popup is open,
   since WooCommerce's real Add to Cart button lives outside the popup on
   the dimmed main page and isn't reachable there. Mirrors the mobile
   sticky bar's look/behaviour (a real `name="add-to-cart"` submit button
   in the same form), just always shown here rather than only on mobile. */
#devexhub-3d-customiser-popup-cart-bar {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	margin-top: 14px;
	padding: 14px 22px calc(14px + env(safe-area-inset-bottom, 0px));
	background: #fff;
	border-top: 1px solid var(--devexhub-3d-customiser-line, #e5e7ec);
}

#devexhub-3d-customiser-popup-cart-total {
	display: flex;
	flex-direction: column;
	line-height: 1.2;
}

#devexhub-3d-customiser-popup-total-price {
	font-size: 19px;
	font-weight: 700;
	color: var(--devexhub-3d-customiser-ink);
}

.devexhub-3d-customiser-popup-cart-btn {
	flex: none;
	background: var(--devexhub-3d-customiser-ink, #1f2a44);
	color: #fff;
	border: none;
	border-radius: 999px;
	padding: 13px 28px;
	font-size: 14.5px;
	font-weight: 700;
	cursor: pointer;
	transition: opacity 0.15s ease;
}

.devexhub-3d-customiser-popup-cart-btn:hover {
	opacity: 0.9;
}

.devexhub-3d-customiser-popup-close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 32px;
	height: 32px;
	border: none;
	border-radius: 50%;
	background: var(--devexhub-3d-customiser-surface, #f7f7f9);
	color: var(--devexhub-3d-customiser-ink, #1f2a44);
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	z-index: 2;
}

.devexhub-3d-customiser-popup-close:hover {
	background: var(--devexhub-3d-customiser-line, #e5e7ec);
}

/* "Edit design" link shown under a customized line on the Cart page. */
.devexhub-3d-customiser-edit-design-link {
	display: inline-block;
	margin-top: 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--devexhub-3d-customiser-accent, #4b3fd6);
	text-decoration: underline;
}

.devexhub-3d-customiser-edit-design-link:hover {
	opacity: 0.8;
}

/* -- Real photo strip alongside the 3D viewer ------------------------------- */
.devexhub-3d-customiser-photo-strip {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 12px;
	padding: 0 4px;
}

.devexhub-3d-customiser-photo-thumb {
	width: 64px;
	height: 64px;
	padding: 0;
	border: 2px solid transparent;
	border-radius: 8px;
	overflow: hidden;
	cursor: pointer;
	background: #f2f2f2;
	transition: border-color 0.15s ease;
}

.devexhub-3d-customiser-photo-thumb:hover {
	border-color: var(--devexhub-3d-customiser-accent, #4b3fd6);
}

.devexhub-3d-customiser-photo-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

#devexhub-3d-customiser-photo-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(0, 0, 0, 0.75);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

#devexhub-3d-customiser-photo-lightbox .devexhub-3d-customiser-modal-box {
	position: relative;
	background: #fff;
	border-radius: 10px;
	padding: 12px;
	max-width: 90vw;
	max-height: 90vh;
	overflow: auto;
}

#devexhub-3d-customiser-photo-lightbox .devexhub-3d-customiser-modal-close {
	position: absolute;
	top: 6px;
	right: 10px;
	background: none;
	border: none;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	color: #444;
}

#devexhub-3d-customiser-photo-lightbox-image {
	display: block;
	max-width: 100%;
	max-height: 80vh;
	height: auto;
	border-radius: 6px;
}

/* =======================================================================
   Full-Customise layout pass
   -----------------------------------------------------------------------
   Everything below is scoped to body.devexhub-3d-customiser-full-active:not(.devexhub-3d-studio) so
   Semi-Customise (which keeps the theme's own gallery + popup) is
   untouched. Appended last on purpose: these are deliberate overrides of
   the generic rules further up, and relying on source order keeps them in
   one readable block instead of scattered !important edits.
   ======================================================================= */

/* -- Layout lives in the theme ----------------------------------------
   The active theme (sky-athletics, assets/css/product.css) owns the
   product-page grid and the canvas height for Full-Customise, with
   selectors more specific than anything scoped to a plugin #id. Columns
   and canvas height are therefore set THERE, not here -- duplicating them
   in this file just creates two sources of truth that silently disagree.
   ---------------------------------------------------------------------- */

/* -- Minimise / restore ------------------------------------------------- */
.devexhub-3d-customiser-minimise {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0 0 10px auto;
	padding: 6px 14px;
	border: 1px solid var(--devexhub-3d-customiser-line);
	border-radius: 999px;
	background: #fff;
	color: var(--devexhub-3d-customiser-ink-soft);
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
}

.devexhub-3d-customiser-minimise:hover {
	border-color: var(--devexhub-3d-customiser-accent);
	color: var(--devexhub-3d-customiser-accent);
}

#devexhub-3d-customiser-panel {
	display: flex;
	flex-direction: column;
}

/* Hidden until the panel is actually minimised -- otherwise it would sit
   on the model duplicating a panel that's already open. */
.devexhub-3d-customiser-restore {
	display: none;
	position: absolute;
	z-index: 5;
	right: 14px;
	bottom: 14px;
	padding: 12px 22px;
	border: none;
	border-radius: 999px;
	background: var(--devexhub-3d-customiser-accent);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 6px 18px rgba(31, 42, 68, 0.28);
}

body.devexhub-3d-customiser-panel-minimised .devexhub-3d-customiser-restore {
	display: block;
}

/* -- "Required" pill: live, not decorative ------------------------------ */
/* refreshStepRequiredBadges() in customizer.js hides the pill the moment a
   step has nothing outstanding; this just marks the finished state so the
   nav reads at a glance. */
.devexhub-3d-customiser-step-btn.is-step-complete .devexhub-3d-customiser-step-btn-label::after {
	content: " ✓";
	color: #1a9c5b;
	font-weight: 700;
}

/* -- Saved Custom Designs listing ([devexhub_3d_custom_designs]) --------- */
.devexhub-3d-customiser-designs-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 20px;
}

.devexhub-3d-customiser-design-card {
	border: 1px solid var(--devexhub-3d-customiser-line, #e3e6ec);
	border-radius: 14px;
	padding: 14px;
	background: #fff;
	text-align: center;
}

.devexhub-3d-customiser-design-card img {
	width: 100%;
	height: 200px;
	object-fit: contain;
	background: var(--devexhub-3d-customiser-surface, #f4f5f8);
	border-radius: 10px;
	margin-bottom: 10px;
}

.devexhub-3d-customiser-design-card h4 {
	margin: 0 0 4px;
	font-size: 15px;
}

.devexhub-3d-customiser-design-date {
	margin: 0 0 10px;
	font-size: 12px;
	color: var(--devexhub-3d-customiser-ink-soft, #6b7280);
}

.devexhub-3d-customiser-design-use {
	display: inline-block;
	padding: 9px 18px;
	border-radius: 999px;
	background: var(--devexhub-3d-customiser-accent, #5b3df5);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
}

.devexhub-3d-customiser-design-use:hover {
	filter: brightness(1.1);
	color: #fff;
}

/* -- Colour filter row + material sections ------------------------------
   The shopper picks a colour family first, then a material within it --
   a colour cuts across every material type, so this is a filter above the
   swatches rather than another level of drill-down. */
.devexhub-3d-customiser-colour-filter {
	margin: 0 0 14px;
}

.devexhub-3d-customiser-colour-filter-label {
	display: block;
	margin-bottom: 8px;
	font-size: 11px;
	font-style: italic;
	letter-spacing: 0.04em;
	color: var(--devexhub-3d-customiser-ink-soft, #6b7280);
}

.devexhub-3d-customiser-colour-circles {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.devexhub-3d-customiser-colour-circle {
	width: 34px;
	height: 34px;
	padding: 0;
	border-radius: 50%;
	border: 2px solid transparent;
	box-shadow: 0 0 0 1px var(--devexhub-3d-customiser-line, #e3e6ec);
	cursor: pointer;
	font-size: 0;
	transition: transform 0.12s ease, border-color 0.12s ease;
}

.devexhub-3d-customiser-colour-circle:hover {
	transform: scale(1.08);
}

.devexhub-3d-customiser-colour-circle.is-active {
	border-color: var(--devexhub-3d-customiser-accent, #5b3df5);
}

.devexhub-3d-customiser-material-heading {
	margin: 16px 0 8px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--devexhub-3d-customiser-ink-soft, #6b7280);
}

.devexhub-3d-customiser-material-heading:first-child {
	margin-top: 0;
}

/* The swatch grid used to be #devexhub-3d-customiser-zone-options itself;
   it is now one grid per material-type section, so the layout moves onto
   the section wrapper. */
.devexhub-3d-customiser-swatch-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
	gap: 10px;
}

/* "MATERIAL" label above the type sections — mirrors the reference, where
   the shopper is told plainly that the second choice is a fabric. */
.devexhub-3d-customiser-material-title {
	margin: 18px 0 4px;
	font-size: 15px;
	font-weight: 600;
	color: var(--devexhub-3d-customiser-ink, #1f2a44);
}

/* =====================================================================
   Standalone customiser page  ( /customiser/<product-slug> )
   ---------------------------------------------------------------------
   A full-bleed stage carrying the model, with floating chrome over it:
   the piece's name top-left, navigation icons and the live Design
   Summary top-right, and the option deck along the bottom.

   The elements inside the deck and the summary are the SAME nodes the
   product page renders — these rules place and re-skin them, they never
   rebuild a control. The old left-hand options rail is gone; the deck
   took its job.
   ===================================================================== */
body.devexhub-3d-studio {
	margin: 0;
	background: #f4f4f3;
	overflow: hidden;                 /* the deck scrolls, never the page */
	--dx-ink: #040e49;                /* Skye navy, where the reference uses black */
	--dx-ink-soft: #0a1a5e;
	--dx-line: #e2e2e0;
	--dx-line-strong: #131313;
	--dx-muted: #6b6b70;
	--dx-surface: #ffffff;
	--dx-gutter: clamp(14px, 3vw, 48px);
	--dx-radius: 8px;
}

body.devexhub-3d-studio #wpadminbar { position: fixed; }

/* ---------------------------------------------------------------------
   The grid. The form IS the layout, so every control stays inside the
   one form that submits the design (see the studio template).
   The shell itself ignores pointer events so the model underneath can be
   dragged everywhere the chrome isn't.
   --------------------------------------------------------------------- */
.devexhub-3d-studio-shell {
	position: relative;
	z-index: 1;
	min-height: 100vh;
	min-height: 100dvh;
	margin: 0;
	padding: var(--dx-gutter);
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-rows: auto minmax(0, 1fr) auto;
	gap: 16px;
	pointer-events: none;
}

body.admin-bar.devexhub-3d-studio .devexhub-3d-studio-shell {
	min-height: calc(100dvh - var(--wp-admin--admin-bar--height, 32px));
}

.devexhub-3d-studio-shell > * { pointer-events: auto; }

.dx-studio-ident,
.dx-studio-tools,
.dx-studio-summary,
.dx-studio-deck,
.dx-studio-mobile-actions { position: relative; z-index: -1; }

/* The stage sits behind the whole grid rather than in a cell of it. */
.devexhub-3d-studio-stage {
	position: fixed;
	inset: 0;
	z-index: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background:
		radial-gradient(120% 80% at 50% 38%, #ffffff 0%, #f4f4f3 62%, #ececea 100%);
}

body.admin-bar.devexhub-3d-studio .devexhub-3d-studio-stage {
	top: var(--wp-admin--admin-bar--height, 32px);
}

.devexhub-3d-studio-stage #devexhub-3d-customiser-gallery,
.devexhub-3d-studio-stage #devexhub-3d-customiser-canvas-wrap {
	width: 100%;
	height: 100%;
	/* The phone rules cap the inline viewer at 320px tall. Here the stage
	   IS the screen, so the cap has to come off or the model renders into
	   a strip with empty space under it. */
	max-height: none;
	min-height: 0;
	aspect-ratio: auto;
	max-width: none;
	margin: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}

/* Fades the model out behind the deck instead of letting the two collide. */
.dx-studio-mask {
	position: absolute;
	left: 0; right: 0; bottom: 0;
	height: 26vh;
	pointer-events: none;
	background: linear-gradient(180deg, rgba(244, 244, 243, 0) 0%, rgba(244, 244, 243, .85) 60%, rgba(244, 244, 243, 1) 100%);
}

/* Desktop: the options sit in side panels, nothing is under the model, so
   the fade only washed out the bottom of the garment (worst when zoomed).
   Phones (≤860px) keep it — the options deck sits at the bottom there. */
@media (min-width: 861px) {
	.dx-studio-mask { display: none; }
}

/* ---------------------------------------------------------------------
   Top-left: what you are designing
   --------------------------------------------------------------------- */
.dx-studio-ident {
	grid-column: 1;
	grid-row: 1;
	align-self: start;
	min-width: 0;
}

.dx-studio-name {
	margin: 0 0 4px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #131313;
	line-height: 1.3;
}

.dx-studio-price {
	margin: 0;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: .04em;
	color: var(--dx-muted);
}

.dx-studio-price strong { font-weight: 500; }

/* ---------------------------------------------------------------------
   Top-right: home / cart
   --------------------------------------------------------------------- */
.dx-studio-tools {
	grid-column: 2;
	grid-row: 1;
	justify-self: end;
	align-self: start;
	display: flex;
	gap: 10px;
}

.dx-studio-icon {
	position: relative;
	width: 38px;
	height: 38px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: var(--dx-surface);
	border: 1px solid var(--dx-line);
	color: #131313;
	transition: background-color .2s ease, color .2s ease, transform .2s ease;
}

.dx-studio-icon:hover { background: var(--dx-ink); border-color: var(--dx-ink); color: #fff; }

.dx-studio-icon svg { width: 17px; height: 17px; }

.dx-studio-icon__count {
	position: absolute;
	top: -4px; right: -4px;
	min-width: 17px; height: 17px;
	padding: 0 4px;
	border-radius: 9px;
	background: #fdc502;
	color: #000;
	font-size: 10px;
	font-weight: 800;
	line-height: 17px;
	text-align: center;
}

/* ---------------------------------------------------------------------
   Design Summary card
   --------------------------------------------------------------------- */
.dx-studio-summary {
	grid-column: 2;
	grid-row: 2;
	align-self: start;
	box-shadow: 0 1px 2px rgba(19, 19, 19, .05), 0 14px 34px rgba(19, 19, 19, .07);
	width: 336px;
	max-width: 100%;
	max-height: 100%;
	display: flex;
	flex-direction: column;
	background: var(--dx-surface);
	border: 1px solid var(--dx-line);
	border-radius: var(--dx-radius);
	overflow: hidden;
}

.dx-studio-summary__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 15px 24px;
	border-bottom: 1px solid var(--dx-line);
	background: #f7f7f6;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: #131313;
}

.dx-studio-summary__close { display: none; background: none; border: 0; padding: 4px; cursor: pointer; color: #131313; }

.dx-studio-summary__close svg { width: 16px; height: 16px; }

.dx-studio-summary__body {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	padding: 6px 24px 14px;
}

.dx-studio-summary__body:empty::after {
	content: attr(data-empty);
	display: block;
	padding: 14px 0;
	font-size: 12px;
	color: var(--dx-muted);
}

.dx-studio-summary__foot { padding: 14px 24px 18px; border-top: 1px solid var(--dx-line); }

/* The summary rows are moved in from the options panel; flatten the
   card styling they carried there. */
.dx-studio-summary__body #devexhub-3d-customiser-summary {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
}

.dx-studio-summary__body #devexhub-3d-customiser-summary-rows > * {
	padding: 11px 0;
	border-bottom: 1px solid var(--dx-line);
	font-size: 12px;
	line-height: 1.5;
}

.dx-studio-summary__body #devexhub-3d-customiser-summary-rows > *:last-child { border-bottom: 0; }

.dx-studio-summary__body #devexhub-3d-customiser-summary-total {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	margin-top: 10px;
	padding-top: 12px;
	border-top: 1px solid var(--dx-line-strong);
	font-size: 12px;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.dx-studio-summary__body #devexhub-3d-customiser-total-price { font-size: 15px; font-weight: 800; color: #131313; }

.dx-studio-buy,
.devexhub-3d-studio .dx-studio-buy {
	display: block;
	width: 100%;
	padding: 12px 16px;
	border: 0;
	border-radius: 2px;
	background: var(--dx-ink);
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color .2s ease;
}

.dx-studio-buy:hover { background: var(--dx-ink-soft); }

/* ---------------------------------------------------------------------
   The deck
   --------------------------------------------------------------------- */
.dx-studio-deck {
	grid-column: 1 / -1;
	grid-row: 3;
	align-self: end;
	box-shadow: 0 1px 2px rgba(19, 19, 19, .05), 0 14px 34px rgba(19, 19, 19, .07);
	background: var(--dx-surface);
	border: 1px solid var(--dx-line);
	border-radius: var(--dx-radius);
	padding: 18px 20px 20px;
	max-height: 46vh;
	overflow-y: auto;
	overscroll-behavior: contain;
}

/* Collapse / expand ------------------------------------------------- */
.dx-studio-deck { position: relative; transition: padding .25s ease; }

.dx-studio-deck__toggle {
	position: absolute;
	top: 10px;
	right: 12px;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 10px;
	border: 1px solid var(--dx-line);
	border-radius: 100px;
	background: #fff;
	color: var(--dx-muted);
	font-size: 10px;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
	cursor: pointer;
	transition: color .2s ease, border-color .2s ease, background-color .2s ease;
}

.dx-studio-deck__toggle:hover { color: #131313; border-color: #131313; }

.dx-studio-deck__toggle svg { width: 14px; height: 14px; transition: transform .25s ease; }

/* Collapsed: the deck folds to the pill alone, and the model gets the
   screen back. The panel is hidden with visibility rather than removed so
   the form still submits every control inside it. */
.dx-studio-deck.is-collapsed {
	padding: 8px 12px;
	max-height: none;
	overflow: visible;
	background: transparent;
	border-color: transparent;
	box-shadow: none;
	text-align: center;
}

.dx-studio-deck.is-collapsed .dx-studio-stepper,
.dx-studio-deck.is-collapsed .dx-studio-deck__panel {
	display: none;
}

.dx-studio-deck.is-collapsed .dx-studio-deck__toggle {
	position: static;
	box-shadow: 0 1px 2px rgba(19, 19, 19, .05), 0 10px 26px rgba(19, 19, 19, .08);
}

.dx-studio-deck.is-collapsed .dx-studio-deck__toggle svg { transform: rotate(180deg); }

/* With the deck folded away the mask and the model's own controls have no
   panel to sit clear of. */
body.dx-deck-collapsed .dx-studio-mask { height: 12vh; }

body.dx-deck-collapsed .dx-studio-stage-tools { bottom: 92px; }

.dx-studio-stepper {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 18px;
	margin-bottom: 14px;
}

.dx-studio-stepper[hidden] { display: none; }

.dx-studio-stepper__arrow {
	width: 30px; height: 30px;
	display: grid; place-items: center;
	border: 0; background: none; cursor: pointer;
	color: #131313; border-radius: 50%;
	transition: background-color .2s ease, opacity .2s ease;
}

.dx-studio-stepper__arrow:hover:not(:disabled) { background: #f0f0ee; }

.dx-studio-stepper__arrow:disabled { opacity: .25; cursor: default; }

.dx-studio-stepper__arrow svg { width: 17px; height: 17px; }

.dx-studio-stepper__label {
	margin: 0;
	display: inline-flex;
	align-items: baseline;
	gap: 10px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: #131313;
}

.dx-studio-stepper__label em { font-style: normal; font-weight: 500; color: var(--dx-muted); letter-spacing: .06em; }

/* The options panel, flattened into the deck. */
.dx-studio-deck__panel #devexhub-3d-customiser-panel,
.devexhub-3d-studio #devexhub-3d-customiser-panel {
	position: static;
	width: auto;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	overflow: visible;
}

.devexhub-3d-studio #devexhub-3d-customiser-minimise,
.devexhub-3d-studio #devexhub-3d-customiser-restore,
.devexhub-3d-studio #devexhub-3d-customiser-customise-toggle { display: none !important; }

.devexhub-3d-studio .devexhub-3d-customiser-step-panel { padding: 0; }

.devexhub-3d-studio .devexhub-3d-customiser-panel-section {
	margin: 0 0 16px;
	padding: 0;
	border: 0;
	background: none;
}

.devexhub-3d-studio .devexhub-3d-customiser-panel-section:last-child { margin-bottom: 0; }

.devexhub-3d-studio .devexhub-3d-customiser-panel-section h4 {
	margin: 0 0 10px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--dx-muted);
	text-align: center;
}

/* Choice buttons get the reference's flat, near-square pill. */
.devexhub-3d-studio .devexhub-3d-customiser-swatch-grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
}

.devexhub-3d-studio .devexhub-3d-customiser-swatch,
.devexhub-3d-studio .devexhub-3d-customiser-option-btn {
	border-radius: 2px;
	border: 1px solid #d7d7d7;
	background: #fff;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: #131313;
	transition: border-color .2s ease, background-color .2s ease, color .2s ease;
}

.devexhub-3d-studio .devexhub-3d-customiser-swatch.is-selected,
.devexhub-3d-studio .devexhub-3d-customiser-option-btn.is-selected,
.devexhub-3d-studio .devexhub-3d-customiser-swatch[aria-pressed="true"] {
	background: var(--dx-ink);
	border-color: var(--dx-ink);
	color: #fff;
}

.devexhub-3d-studio .devexhub-3d-customiser-swatch-grid input,
.devexhub-3d-studio .devexhub-3d-customiser-panel-section input[type="text"],
.devexhub-3d-studio .devexhub-3d-customiser-panel-section input[type="number"],
.devexhub-3d-studio .devexhub-3d-customiser-panel-section select,
.devexhub-3d-studio .devexhub-3d-customiser-panel-section textarea {
	border-radius: 2px;
	border: 1px solid #d7d7d7;
	font-size: 13px;
}

.devexhub-3d-studio .devexhub-3d-customiser-zone-menu,
.devexhub-3d-studio .devexhub-3d-customiser-body-row { justify-content: center; }

/* The size-chart link and zoom control are moved into this row by
   customizer.js so they sit with the model, not in the deck. */
.dx-studio-stage-tools {
    position: fixed;
    /* right: var(--dx-gutter); */
    bottom: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: none;
    left: 50%;
    transform: translateX(-50%);
}
.dx-studio-stage-tools > * { pointer-events: auto; }

/* The size-chart link is `position:absolute; top:12px; right:12px` on the
   inline product page, where it is pinned to the canvas wrap. In the studio
   it has been MOVED into this row, so that absolute positioning makes it
   float back up to the nearest positioned ancestor and land on the home /
   cart icons. Inside this row it is laid out by the row. */
.dx-studio-stage-tools .devexhub-3d-customiser-size-chart-link {
	position: static;
	top: auto;
	right: auto;
	bottom: auto;
	left: auto;
}

/* The rotate hint is printed inside the canvas markup, top-left — which on
   this page is where the piece's name lives. Move it under the model. */
.devexhub-3d-studio .devexhub-3d-customiser-badge {
	top: 18px;
	bottom: auto;
	left: 50%;
	right: auto;
	transform: translateX(-50%);
	background: rgba(255, 255, 255, .82);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	border: 1px solid var(--dx-line);
	color: var(--dx-muted);
	font-size: 11px;
	letter-spacing: .06em;
}

.dx-studio-mobile-actions { display: none; }

/* =====================================================================
   Text decoration: font + application method
   ===================================================================== */
.devexhub-3d-customiser-panel-subsection { margin: 16px 0 0; }

#devexhub-3d-customiser-font-options {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
	gap: 8px;
	margin-top: 8px;
}

.devexhub-3d-customiser-font-btn {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	min-height: 52px;
	padding: 10px 8px;
	border: 1px solid var(--devexhub-3d-customiser-line, #e0e3e7);
	border-radius: 10px;
	background: #fff;
	font-size: 18px;
	line-height: 1.15;
	cursor: pointer;
	/* The name is drawn in its own typeface, so it must not wrap into an
	   unreadable stack on a narrow rail. */
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.devexhub-3d-customiser-font-btn:hover { background: #f7f8fa; }

.devexhub-3d-customiser-font-btn.is-active {
	border-color: var(--devexhub-3d-customiser-accent, #5b3df5);
	box-shadow: 0 0 0 2px rgba(91, 61, 245, 0.16);
}

.devexhub-3d-customiser-font-price {
	font-family: inherit;
	font-size: 10px;
	font-weight: 700;
	color: var(--devexhub-3d-customiser-ink-soft, #6b7280);
}

#devexhub-3d-customiser-textstyle-options {
	display: grid;
	gap: 8px;
	margin-top: 8px;
}

.devexhub-3d-customiser-textstyle-btn {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 3px;
	padding: 12px 14px;
	border: 1px solid var(--devexhub-3d-customiser-line, #e0e3e7);
	border-radius: 10px;
	background: #fff;
	text-align: left;
	cursor: pointer;
}

.devexhub-3d-customiser-textstyle-btn:hover { background: #f7f8fa; }

.devexhub-3d-customiser-textstyle-btn.is-active {
	border-color: var(--devexhub-3d-customiser-accent, #5b3df5);
	box-shadow: 0 0 0 2px rgba(91, 61, 245, 0.16);
}

.devexhub-3d-customiser-textstyle-name {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.02em;
}

.devexhub-3d-customiser-textstyle-price {
	font-size: 12px;
	font-weight: 600;
	color: var(--devexhub-3d-customiser-ink-soft, #6b7280);
}

.devexhub-3d-customiser-textstyle-note {
	font-size: 11px;
	line-height: 1.35;
	color: var(--devexhub-3d-customiser-ink-soft, #6b7280);
}

/* =====================================================================
   Graphics
   ===================================================================== */
#devexhub-3d-customiser-graphic-cats {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 10px 0 12px;
}

.devexhub-3d-customiser-graphic-cat {
	padding: 6px 12px;
	border: 1px solid var(--devexhub-3d-customiser-line, #e0e3e7);
	border-radius: 999px;
	background: #fff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	cursor: pointer;
}

.devexhub-3d-customiser-graphic-cat:hover { background: #f4f5f7; }

.devexhub-3d-customiser-graphic-cat.is-active {
	background: var(--devexhub-3d-customiser-ink, #1f2937);
	border-color: var(--devexhub-3d-customiser-ink, #1f2937);
	color: #fff;
}

#devexhub-3d-customiser-graphic-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
	gap: 8px;
}

.devexhub-3d-customiser-graphic-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 5px;
	padding: 8px 6px;
	border: 1px solid var(--devexhub-3d-customiser-line, #e0e3e7);
	border-radius: 10px;
	background: #fff;
	cursor: pointer;
}

.devexhub-3d-customiser-graphic-card:hover { background: #f7f8fa; }

.devexhub-3d-customiser-graphic-card.is-active {
	border-color: var(--devexhub-3d-customiser-accent, #5b3df5);
	box-shadow: 0 0 0 2px rgba(91, 61, 245, 0.16);
}

.devexhub-3d-customiser-graphic-card img {
	width: 100%;
	height: 52px;
	object-fit: contain;
	display: block;
}

.devexhub-3d-customiser-graphic-name {
	font-size: 10px;
	line-height: 1.2;
	text-align: center;
	color: var(--devexhub-3d-customiser-ink-soft, #6b7280);
	/* Two lines maximum, so one long sponsor name can't stretch the row. */
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

#devexhub-3d-customiser-graphic-sizes {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 8px;
	margin-top: 8px;
}

.devexhub-3d-customiser-gfxsize-btn {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	padding: 10px 12px;
	border: 1px solid var(--devexhub-3d-customiser-line, #e0e3e7);
	border-radius: 10px;
	background: #fff;
	text-align: left;
	cursor: pointer;
}

.devexhub-3d-customiser-gfxsize-btn:hover { background: #f7f8fa; }

.devexhub-3d-customiser-gfxsize-btn.is-active {
	border-color: var(--devexhub-3d-customiser-accent, #5b3df5);
	box-shadow: 0 0 0 2px rgba(91, 61, 245, 0.16);
}

.devexhub-3d-customiser-gfxsize-name {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.02em;
}

.devexhub-3d-customiser-gfxsize-price {
	font-size: 13px;
	font-weight: 800;
}

.devexhub-3d-customiser-gfxsize-range {
	font-size: 10px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--devexhub-3d-customiser-ink-soft, #6b7280);
}

#devexhub-3d-customiser-graphic-note {
	width: 100%;
	margin-top: 6px;
	padding: 9px 11px;
	border: 1px solid var(--devexhub-3d-customiser-line, #e0e3e7);
	border-radius: 9px;
	font: inherit;
	font-size: 13px;
	resize: vertical;
}

.devexhub-3d-customiser-ghost-btn {
	margin-top: 14px;
	padding: 9px 14px;
	border: 1px solid var(--devexhub-3d-customiser-line, #e0e3e7);
	border-radius: 9px;
	background: #fff;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.03em;
	color: #b32d2e;
	cursor: pointer;
}

.devexhub-3d-customiser-ghost-btn:hover { background: #fdf3f3; }

/* --- Cancel / Done rows on the optional steps ------------------------ */
.devexhub-3d-customiser-confirm-row {
	display: flex;
	gap: 8px;
	margin-top: 18px;
	padding-top: 14px;
	border-top: 1px solid var(--devexhub-3d-customiser-line, #e0e3e7);
}

.devexhub-3d-customiser-confirm-row .devexhub-3d-customiser-ghost-btn { margin-top: 0; }

.devexhub-3d-customiser-done-btn {
	flex: 1 1 auto;
	padding: 11px 18px;
	border: 0;
	border-radius: 9px;
	background: var(--devexhub-3d-customiser-ink, #1f2937);
	color: #fff;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	cursor: pointer;
}

.devexhub-3d-customiser-done-btn:hover { filter: brightness(1.15); }

/* --- Graphic size / orientation presets ------------------------------ */
.devexhub-3d-customiser-graphic-scale-presets,
.devexhub-3d-customiser-graphic-rotate-presets {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 8px 0;
}

.devexhub-3d-customiser-graphic-scale-btn,
.devexhub-3d-customiser-graphic-rotate-btn {
	padding: 7px 13px;
	border: 1px solid var(--devexhub-3d-customiser-line, #e0e3e7);
	border-radius: 999px;
	background: #fff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.03em;
	cursor: pointer;
}

.devexhub-3d-customiser-graphic-scale-btn:hover,
.devexhub-3d-customiser-graphic-rotate-btn:hover { background: #f4f5f7; }

.devexhub-3d-customiser-graphic-scale-btn.is-active,
.devexhub-3d-customiser-graphic-rotate-btn.is-active {
	background: var(--devexhub-3d-customiser-ink, #1f2937);
	border-color: var(--devexhub-3d-customiser-ink, #1f2937);
	color: #fff;
}

#devexhub-3d-customiser-graphic-scale,
#devexhub-3d-customiser-graphic-rotation { width: 100%; }

#devexhub-3d-customiser-graphic-upload-section {
	margin-top: 18px;
	padding-top: 14px;
	border-top: 1px solid var(--devexhub-3d-customiser-line, #e0e3e7);
}

#devexhub-3d-customiser-graphic-file {
	display: block;
	width: 100%;
	margin-top: 6px;
	font-size: 12px;
}

/* --- Graphics: three-screen flow ------------------------------------- */
.devexhub-3d-customiser-graphic-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 4px;
}

.devexhub-3d-customiser-graphic-head h4 { margin: 0; }

.devexhub-3d-customiser-graphic-back {
	padding: 6px 12px;
	border: 1px solid var(--devexhub-3d-customiser-line, #e0e3e7);
	border-radius: 999px;
	background: #fff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.03em;
	cursor: pointer;
	white-space: nowrap;
}

.devexhub-3d-customiser-graphic-back:hover { background: #f4f5f7; }

#devexhub-3d-customiser-graphic-source-tiles {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
	gap: 10px;
	margin-top: 12px;
}

.devexhub-3d-customiser-graphic-source {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 104px;
	padding: 16px 10px;
	border: 1px solid var(--devexhub-3d-customiser-line, #e0e3e7);
	border-radius: 12px;
	background: #fff;
	cursor: pointer;
	text-align: center;
}

.devexhub-3d-customiser-graphic-source:hover {
	background: #f7f8fa;
	border-color: var(--devexhub-3d-customiser-accent, #5b3df5);
}

.devexhub-3d-customiser-graphic-source-icon svg {
	width: 30px;
	height: 30px;
	display: block;
}

.devexhub-3d-customiser-graphic-source-label {
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.devexhub-3d-customiser-graphic-source-sub {
	font-size: 10px;
	color: var(--devexhub-3d-customiser-ink-soft, #6b7280);
}

/* The chosen artwork, echoed at the top of the size screen so the
   shopper can see what they are pricing without going back. */
.devexhub-3d-customiser-graphic-chosen {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 12px 0 4px;
	padding: 10px 12px;
	border: 1px solid var(--devexhub-3d-customiser-line, #e0e3e7);
	border-radius: 10px;
	background: #fafbfc;
}

.devexhub-3d-customiser-graphic-chosen img {
	width: 40px;
	height: 40px;
	object-fit: contain;
	flex: 0 0 auto;
}

.devexhub-3d-customiser-graphic-chosen span {
	font-size: 12px;
	font-weight: 700;
}

/* Upload: a drop-style label doing the work, with the real input hidden
   because no browser lets it be styled properly. */
#devexhub-3d-customiser-graphic-file {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

.devexhub-3d-customiser-upload-drop {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 8px;
	padding: 22px 16px;
	border: 1.5px dashed var(--devexhub-3d-customiser-line, #c8ccd2);
	border-radius: 12px;
	background: #fafbfc;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	cursor: pointer;
}

.devexhub-3d-customiser-upload-drop:hover {
	border-color: var(--devexhub-3d-customiser-accent, #5b3df5);
	background: #f6f5ff;
}

.devexhub-3d-customiser-upload-plus {
	font-size: 18px;
	line-height: 1;
}

#devexhub-3d-customiser-graphic-upload-preview {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 10px;
}

#devexhub-3d-customiser-graphic-upload-preview:empty { display: none; }

#devexhub-3d-customiser-graphic-upload-preview img {
	width: 46px;
	height: 46px;
	object-fit: contain;
	border: 1px solid var(--devexhub-3d-customiser-line, #e0e3e7);
	border-radius: 8px;
	background: #fff;
}

#devexhub-3d-customiser-graphic-upload-preview span {
	font-size: 11px;
	color: var(--devexhub-3d-customiser-ink-soft, #6b7280);
	word-break: break-all;
}

#devexhub-3d-customiser-graphic-colour {
	width: 100%;
	margin-top: 6px;
	padding: 9px 11px;
	border: 1px solid var(--devexhub-3d-customiser-line, #e0e3e7);
	border-radius: 9px;
	font: inherit;
	font-size: 13px;
}

.devexhub-3d-customiser-done-btn[disabled] {
	opacity: 0.45;
	cursor: not-allowed;
}

/* --- Text: running preview + add-on pickers -------------------------- */
#devexhub-3d-customiser-text-preview {
	margin: 0 0 14px;
	padding: 14px 16px;
	border: 1px solid var(--devexhub-3d-customiser-line, #e0e3e7);
	border-radius: 10px;
	background: #fafbfc;
	text-align: center;
	overflow: hidden;
}

#devexhub-3d-customiser-text-preview-value {
	font-size: 26px;
	line-height: 1.15;
	letter-spacing: 0.02em;
	word-break: break-word;
}

#devexhub-3d-customiser-outline-options,
#devexhub-3d-customiser-finish-options,
#devexhub-3d-customiser-patch-options {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
	gap: 8px;
	margin-top: 8px;
}

.devexhub-3d-customiser-addon-btn {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	padding: 10px 12px;
	border: 1px solid var(--devexhub-3d-customiser-line, #e0e3e7);
	border-radius: 10px;
	background: #fff;
	text-align: left;
	cursor: pointer;
}

.devexhub-3d-customiser-addon-btn:hover { background: #f7f8fa; }

.devexhub-3d-customiser-addon-btn.is-active {
	border-color: var(--devexhub-3d-customiser-accent, #5b3df5);
	box-shadow: 0 0 0 2px rgba(91, 61, 245, 0.16);
}

.devexhub-3d-customiser-addon-name {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.02em;
}

.devexhub-3d-customiser-addon-price {
	font-size: 11px;
	font-weight: 600;
	color: var(--devexhub-3d-customiser-ink-soft, #6b7280);
}

#devexhub-3d-customiser-outline-colour-row { margin-top: 12px; }

#devexhub-3d-customiser-outline-colour-options {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 6px;
}

/* -------------------------------------------------------------------------
 *  My Account -> My Designs
 * ---------------------------------------------------------------------- */
.devexhub-3d-designs-list { list-style: none; margin: 0; padding: 0; }

.devexhub-3d-design-row {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 14px 0;
	border-bottom: 1px solid rgba(0, 0, 0, .08);
}

.devexhub-3d-design-row:last-child { border-bottom: 0; }

.devexhub-3d-design-row__media { flex: 0 0 72px; }

.devexhub-3d-design-row__media img {
	display: block;
	width: 72px;
	height: 72px;
	object-fit: contain;
	background: #f6f6f6;
	border-radius: 8px;
}

.devexhub-3d-design-row__body { flex: 1 1 auto; min-width: 0; }

.devexhub-3d-design-row__body strong { display: block; }

.devexhub-3d-design-row__meta { font-size: .85em; opacity: .7; }

.devexhub-3d-design-row__actions { flex: 0 0 auto; }

/* -------------------------------------------------------------------------
 *  Studio page layout corrections
 * ---------------------------------------------------------------------- */

/* The studio has no site header -- it renders its own bar -- but the theme
   reserves space for its fixed header on every page with `html body {
   padding-top: var(--header-h) }`. On this page that reserved strip is just
   dead white space above the studio.
   A class selector outranks the theme's element-only selector, so this wins
   without !important and without the theme needing to know about it. */
body.devexhub-3d-studio-page {
	padding-top: 0;
}

/* The Size Chart link and the total pill are both pinned top-right, but to
   DIFFERENT boxes -- the link to the canvas wrap, the pill to the stage
   around it -- so their 12px and 26px offsets are measured from different
   origins and the two collided. Dropping the link below the pill inside the
   canvas is the fix that survives the stage growing or shrinking. */
.devexhub-3d-studio .devexhub-3d-customiser-size-chart-link {
	top: 34px;
}

/* -------------------------------------------------------------------------
 *  Studio HUD — one stack, top-right of the stage
 * ---------------------------------------------------------------------- */

/* The top bar is gone; these are what replaced it. Everything that floats
   over the model now sits in a single column so nothing can collide with
   anything else, whatever the stage size. */
.devexhub-3d-studio-hud {
	position: absolute;
	top: 18px;
	right: 18px;
	/* Above 40: on mobile the gallery wrapper becomes position:sticky with
	   z-index 40, which otherwise paints straight over this stack and made
	   the whole HUD invisible on a phone while still measuring as visible. */
	z-index: 60;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 10px;
	/* The stack must not swallow drags meant for the model; each control
	   turns pointer events back on for itself. */
	pointer-events: none;
}

.devexhub-3d-studio-hud > * { pointer-events: auto; }

/* The pill keeps its look but is now laid out by the stack, not pinned. */
.devexhub-3d-studio .devexhub-3d-studio-price-pill {
	position: static;
	top: auto;
	right: auto;
}

/* Size Chart, moved in here by buildStudioHud(). */
.devexhub-3d-studio-hud .devexhub-3d-customiser-size-chart-link {
	position: static;
	top: auto;
	right: auto;
	box-shadow: 0 2px 10px rgba(16, 24, 40, 0.06);
	border-color: #e6e8eb;
	background: #fff;
}

.devexhub-3d-studio-hud__nav {
	display: flex;
	gap: 8px;
}

.devexhub-3d-studio-hud__btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 999px;
	background: #fff;
	border: 1px solid #e6e8eb;
	box-shadow: 0 2px 10px rgba(16, 24, 40, 0.06);
	color: #111827;
	text-decoration: none;
	transition: border-color .2s ease, transform .2s ease;
}

.devexhub-3d-studio-hud__btn:hover { border-color: #111827; transform: translateY(-1px); }

.devexhub-3d-studio-hud__btn svg { width: 18px; height: 18px; }

.devexhub-3d-studio-hud__count {
	position: absolute;
	top: -4px;
	right: -4px;
	min-width: 17px;
	height: 17px;
	padding: 0 4px;
	border-radius: 999px;
	background: #111827;
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	line-height: 17px;
	text-align: center;
}

/* Zoom, moved in here too — it used to sit bottom-left of the canvas. */
.devexhub-3d-studio-hud #devexhub-3d-customiser-zoom {
	position: static;
	left: auto;
	right: auto;
	bottom: auto;
	top: auto;
	margin: 0;
}

/* -------------------------------------------------------------------------
 *  Text size — the stepper in the Text step
 *
 *  The slider under it is the same control; the buttons exist because a
 *  slider is a poor target on a phone and gives no readout of where it is.
 * ---------------------------------------------------------------------- */
.devexhub-3d-customiser-text-size-block .devexhub-3d-customiser-text-size-stepper {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 8px 0 10px;
}

.devexhub-3d-customiser-text-size-btn {
	width: 34px;
	height: 34px;
	display: grid;
	place-items: center;
	padding: 0;
	border: 1px solid rgba(0, 0, 0, .18);
	border-radius: 50%;
	background: #fff;
	color: #131313;
	font-size: 17px;
	line-height: 1;
	cursor: pointer;
	transition: background-color .2s ease, border-color .2s ease;
}

.devexhub-3d-customiser-text-size-btn:hover { background: #f2f2f0; border-color: rgba(0, 0, 0, .3); }

#devexhub-3d-customiser-text-size-value {
	min-width: 52px;
	text-align: center;
	font-size: 13px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.devexhub-3d-customiser-text-size-block input[type="range"] { width: 100%; }

/* =====================================================================
 *  DESKTOP: the options move from a bottom deck to a left rail
 *
 *  The deck is the same element and the same markup inside it -- only its
 *  place in the shell grid changes, so nothing about how a step or a zone
 *  is built had to be touched. A rail is the better shape here because
 *  the options are a LIST that drills down (steps, then zones, then
 *  colours, then materials), and a list wants height, not width: the
 *  bottom deck could only ever show two or three rows before scrolling.
 * ================================================================== */
/* The rail's own two controls belong to the desktop layout only. On a
   phone the deck is a sheet, not a drill-down rail: the stepper moves
   between steps and there is no list to go back to. */
.dx-rail-head,
.dx-rail-back { display: none; }

/* The Done button goes green once the zone actually has something on it.
   Before that the two buttons are equals and neither is the obvious next
   move; after it, Done is. Matches the reference, where picking a
   material is what lights the button up. */
.devexhub-3d-customiser-zone-action-done.is-ready {
	background: #c6f24e;
	border-color: #b6e33c;
	color: #14210a;
	box-shadow: 0 2px 10px rgba(150, 200, 40, .35);
}

.devexhub-3d-customiser-zone-action-done.is-ready:hover {
	background: #b6e33c;
}

/* =====================================================================
 *  Give the model its own room
 *
 *  The stage is full-bleed and the chrome floats over it, so the garment
 *  was centred on the VIEWPORT while the free space was the gap between
 *  the rail and the summary card -- its arms ended up underneath both.
 *  Insetting the stage by those two columns makes the canvas the free
 *  space, so "centred" means centred in what the shopper can actually
 *  see. The model itself is not moved; the box it is measured against is.
 * ================================================================== */
body.devexhub-3d-studio .dx-studio-ident { display: none; }

/* =====================================================================
 *  Colour step, styled to the reference
 *
 *  The differences that mattered: the swatches are a three-up grid of
 *  plain fabric tiles with NO caption under each (the fabric is the
 *  thing being judged, and a name plus a price under every tile turned a
 *  swatch board into a price list), the zone's name is a green bar
 *  rather than a dark one, and Cancel/Done are real buttons at the foot
 *  of the panel instead of two icons up in the heading.
 * ================================================================== */

/* Nobody asked for a way to hide the options -- they are the page. */
.dx-studio-deck__toggle { display: none !important; }

.devexhub-3d-studio #devexhub-3d-customiser-zone-detail {
	--dx-lime: #c6f24e;
	--dx-lime-deep: #b6e33c;
}

/* --- The zone's name: a full-width green bar -------------------- */
.devexhub-3d-studio .devexhub-3d-customiser-zone-detail-head {
	display: block;
	margin: 0 0 14px;
	padding: 0;
	border: 0;
}

.devexhub-3d-studio #devexhub-3d-customiser-zone-detail-title {
	display: block;
	margin: 0;
	padding: 10px 16px;
	border-radius: 4px;
	background: var(--dx-lime);
	color: #14210a;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	text-align: center;
}

/* --- Colour filter: bigger circles, five to a row ----------------- */
.devexhub-3d-studio .devexhub-3d-customiser-colour-filter-label {
	display: block;
	margin: 0 0 10px;
	font-size: 13px;
	font-style: italic;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: #6b6b70;
}

.devexhub-3d-studio .devexhub-3d-customiser-colour-circles {
	display: flex;
	/*grid-template-columns: repeat(5, 1fr);*/
	/*justify-items: center;*/
	gap: 9px;
	flex-wrap: wrap;
	/*padding: 0 5px;*/
}

.devexhub-3d-studio .devexhub-3d-customiser-colour-circle {
	width: 46px;
	height: 46px;
	border: 0;
	box-shadow: 0 1px 4px rgba(19, 19, 19, .22);
}

.devexhub-3d-studio .devexhub-3d-customiser-colour-circle.is-active {
	border: 0;
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px #131313;
}

/* --- Headings ----------------------------------------------------- */
.devexhub-3d-studio .devexhub-3d-customiser-material-title {
	margin: 24px 0 10px;
	font-size: 22px;
	font-weight: 400;
	letter-spacing: .01em;
	text-transform: uppercase;
	color: #131313;
}

.devexhub-3d-studio .devexhub-3d-customiser-material-heading {
	margin: 18px 0 10px;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #8a8a90;
}

/* --- The fabric tiles --------------------------------------------- */
.devexhub-3d-studio .devexhub-3d-customiser-swatch-grid {
	display: flex;
	grid-template-columns: repeat(4, 1fr);
	justify-content: start;
	justify-items: start;
	gap: 14px 12px;
	padding: 0 5px;
}

.devexhub-3d-studio .devexhub-3d-customiser-swatch-card {
	width: 100%;
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
	border-radius: 6px;
	max-width: 70px;
}

.devexhub-3d-studio .devexhub-3d-customiser-swatch-card .devexhub-3d-customiser-swatch-dot {
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	margin: 0;
	border: 0;
	border-radius: 6px;
	background-size: cover;
	background-position: center;
	box-shadow: 0 1px 4px rgba(19, 19, 19, .18);
	transition: box-shadow .18s ease, transform .18s ease;
}

.devexhub-3d-studio .devexhub-3d-customiser-swatch-card:hover .devexhub-3d-customiser-swatch-dot {
	transform: translateY(-1px);
	box-shadow: 0 3px 10px rgba(19, 19, 19, .26);
}

.devexhub-3d-studio .devexhub-3d-customiser-swatch-card.is-active .devexhub-3d-customiser-swatch-dot {
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px #131313;
}

/* The name and the price are still in the markup -- a swatch with no
   accessible name is a coloured square to a screen reader, and the price
   belongs to the row at the foot, where it applies to the one tile the
   shopper actually chose. */
.devexhub-3d-studio .devexhub-3d-customiser-swatch-label,
.devexhub-3d-studio .devexhub-3d-customiser-swatch-price {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

.devexhub-3d-studio .devexhub-3d-customiser-swatch-card { position: relative; }

/* --- What you picked, and what it costs ---------------------------- */
.devexhub-3d-studio #devexhub-3d-customiser-zone-preview {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0;
    margin: 22px 0 0;
    padding: 6px 10px;
    border: 0;
    border-radius: 4px;
    background: #dbe5fb;
    position: sticky;
    bottom: 34.7px;
}

.devexhub-3d-studio #devexhub-3d-customiser-zone-preview-name {
    grid-column: 1;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    color: #131313;
}

.devexhub-3d-studio #devexhub-3d-customiser-zone-preview-type {
    grid-column: 1;
    grid-row: 2;
    font-size: 8px;
    font-style: italic;
    text-transform: uppercase;
    color: #5a6070;
}

.devexhub-3d-studio #devexhub-3d-customiser-zone-preview-price {
	grid-column: 2;
	grid-row: 1 / span 2;
	font-size: 15px;
	font-weight: 500;
	color: #131313;
}

/* --- Cancel / Done, at the foot ------------------------------------ */
.devexhub-3d-studio .devexhub-3d-customiser-zone-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 16px;
    position: sticky;
    bottom: -20px;
    padding: 8px 0;
    background: #fff;
}
.devexhub-3d-studio .devexhub-3d-customiser-zone-action-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: auto;
	height: auto;
	padding: 14px 12px;
	border: 1px solid #131313;
	border-radius: 6px;
	background: #fff;
	color: #131313;
	font-size: 15px;
	font-weight: 500;
	cursor: pointer;
	transition: background-color .2s ease, border-color .2s ease;
}

.devexhub-3d-studio .devexhub-3d-customiser-zone-action-cancel:hover { background: #f2f2f0; }

.devexhub-3d-studio .devexhub-3d-customiser-zone-action-done {
	border-color: #131313;
	background: #fff;
}

/* Green only once something is actually chosen -- see showZonePreview(). */
.devexhub-3d-studio .devexhub-3d-customiser-zone-action-done.is-ready {
	background: var(--dx-lime);
	border-color: var(--dx-lime-deep);
	color: #14210a;
	box-shadow: none;
}

.devexhub-3d-studio .devexhub-3d-customiser-zone-action-done.is-ready:hover {
	background: var(--dx-lime-deep);
}

/* =====================================================================
 *  Custom text — the line editor
 *
 *  Paste this at the END of customizer.css. Every rule is scoped to the
 *  text-line classes, which are new markup, so nothing here can reach
 *  anything you have already styled yourself.
 * ================================================================== */

/* --- One line ------------------------------------------------------ */
.devexhub-3d-customiser-text-line {
	position: relative;
	margin: 0 0 14px;
	padding: 16px;
	border: 1px solid #e4e4e2;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(19, 19, 19, .04);
}

.devexhub-3d-customiser-text-line:focus-within {
	border-color: #131313;
	box-shadow: 0 2px 12px rgba(19, 19, 19, .08);
}

/* --- The head is the accordion control ----------------------------- */
.devexhub-3d-customiser-text-line__head {
	width: 100%;
	display: grid;
	grid-template-columns: auto 1fr auto auto;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	text-align: left;
	cursor: pointer;
}

.devexhub-3d-customiser-text-line__n {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: #8a8a90;
	white-space: nowrap;
}

/* What the line says, so a closed line is still identifiable. */
.devexhub-3d-customiser-text-line__said {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .04em;
	color: #131313;
}

.devexhub-3d-customiser-text-line__said.is-empty {
	font-weight: 400;
	font-style: italic;
	letter-spacing: 0;
	color: #a8a8ae;
}

.devexhub-3d-customiser-text-line__chevron {
	display: grid;
	place-items: center;
	width: 22px;
	height: 22px;
	color: #8a8a90;
	transition: transform .2s ease;
}

.devexhub-3d-customiser-text-line__chevron svg { width: 16px; height: 16px; }

.devexhub-3d-customiser-text-line.is-open .devexhub-3d-customiser-text-line__chevron {
	transform: rotate(180deg);
}

.devexhub-3d-customiser-text-line__remove {
	width: 30px;
	height: 30px;
	display: grid;
	place-items: center;
	padding: 0;
	border: 1px solid #e4e4e2;
	border-radius: 50%;
	background: #fff;
	color: #9a9aa0;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}

.devexhub-3d-customiser-text-line__remove:hover {
	border-color: #c5271d;
	background: #fdf2f1;
	color: #c5271d;
}

/* --- The body opens and closes ------------------------------------- */
/* Collapsed by height rather than display:none so it can animate, and
   so the inputs inside are still submitted with the form. */
.devexhub-3d-customiser-text-line__body {
	overflow: hidden;
	max-height: 0;
	opacity: 0;
	transition: max-height .28s ease, opacity .2s ease, margin-top .28s ease;
}

.devexhub-3d-customiser-text-line.is-open .devexhub-3d-customiser-text-line__body {
	/* Generous enough for the tallest line -- a fixed number is what lets
	   this animate at all; auto does not transition. */
	max-height: 900px;
	opacity: 1;
	margin-top: 14px;
}

/* A closed line is a quieter card than an open one. */
.devexhub-3d-customiser-text-line:not(.is-open) {
	padding: 12px 16px;
	background: #fafaf8;
}

/* --- The words ----------------------------------------------------- */
.devexhub-3d-customiser-text-line .devexhub-3d-customiser-text-input-wrap {
	position: relative;
	display: block;
	margin: 0 0 14px;
}

.devexhub-3d-customiser-text-line__input {
	width: 100%;
	padding: 12px 58px 12px 14px;
	border: 1px solid #d7d7d5;
	border-radius: 6px;
	font-size: 15px;
	letter-spacing: .04em;
	/*text-transform: uppercase;*/
}

.devexhub-3d-customiser-text-line__count {
	position: absolute;
	top: 50%;
	right: 12px;
	transform: translateY(-50%);
	font-size: 11px;
	font-variant-numeric: tabular-nums;
	color: #9a9aa0;
	pointer-events: none;
}

/* --- Fonts: a grid, not a stack ------------------------------------ */
.devexhub-3d-customiser-text-line__fonts {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
	margin: 0 0 4px;
}

.devexhub-3d-customiser-text-line__fonts .devexhub-3d-customiser-font-btn {
	width: 100%;
	min-height: 52px;
	margin: 0;
	padding: 8px 10px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	border: 1px solid #e4e4e2;
	border-radius: 6px;
	background: #fff;
	/* Long names in a display face must not push the grid out of shape. */
	font-size: 15px;
	line-height: 1.1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	cursor: pointer;
}

.devexhub-3d-customiser-text-line__fonts .devexhub-3d-customiser-font-btn.is-active {
	border-color: #131313;
	box-shadow: inset 0 0 0 1px #131313;
}

.devexhub-3d-customiser-text-line__fonts .devexhub-3d-customiser-font-price {
	font-family: inherit;
	font-size: 10px;
	font-weight: 600;
	color: #6b6b70;
}

/* --- Size, curve, angle -------------------------------------------- */
.devexhub-3d-customiser-text-line__control {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: baseline;
	gap: 6px 10px;
	margin-top: 16px;
	padding-top: 14px;
	border-top: 1px solid #f0f0ee;
}

.devexhub-3d-customiser-text-line__control .devexhub-3d-customiser-text-color-label {
	margin: 0;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: #6b6b70;
}

.devexhub-3d-customiser-text-line__value {
	font-size: 13px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	color: #131313;
	text-align: right;
}

.devexhub-3d-customiser-text-line__control input[type="range"] {
	grid-column: 1 / -1;
	width: 100%;
	margin: 8px 0 0;
}

/* Quick angles, so the common cases are one tap. */
.devexhub-3d-customiser-text-line__angles {
	grid-column: 1 / -1;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 10px;
}

.devexhub-3d-customiser-text-line__angles button {
	padding: 6px 12px;
	border: 1px solid #e4e4e2;
	border-radius: 100px;
	background: #fff;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: #6b6b70;
	cursor: pointer;
	transition: border-color .15s ease, color .15s ease;
}

.devexhub-3d-customiser-text-line__angles button:hover {
	border-color: #131313;
	color: #131313;
}

/* --- Add another line ---------------------------------------------- */
.devexhub-3d-customiser-text-add-line {
	width: 100%;
	margin: 0 0 16px;
	padding: 14px;
	border: 1px dashed #c9c9c6;
	border-radius: 8px;
	background: #fff;
	color: #131313;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	cursor: pointer;
	transition: border-color .15s ease, background-color .15s ease;
}

.devexhub-3d-customiser-text-add-line:hover {
	border-color: #131313;
	background: #fafaf8;
}

/* --- Order screen: the three workshop views ------------------------ */
.devexhub-3d-customiser-views {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin: 12px 0 18px;
}

.devexhub-3d-customiser-view { margin: 0; text-align: center; }

.devexhub-3d-customiser-view figcaption {
	margin-top: 6px;
	font-size: 11px;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #6b6b70;
}

/* ==========================================================================
 *  2. DESKTOP
 *  @media (min-width: ...) - larger screens only.
 * ========================================================================== */

/* With the options gone the model takes the full width for a proper look. */
@media (min-width: 992px) {
	body.devexhub-3d-customiser-panel-minimised.devexhub-3d-customiser-relocated .wp-block-columns > .wp-block-column:has(#devexhub-3d-customiser-gallery) {
		flex-basis: 100% !important;
		max-width: 100% !important;
	}
}

/* -- Add to Cart: the options column's footer -----------------------------
   The bar was `position: fixed` and floated over the swatch grid, hiding
   the very colours it was asking you to confirm. Instead the column now
   splits in two: the options panel scrolls inside a bounded height, and
   the bar sits under it as a footer that never moves and never overlaps.

   form.cart is the flex container because this theme renders the whole
   options panel inside it — buildBuyBar() in customizer.js lifts just the
   quantity + button out into .devexhub-3d-customiser-buybar so there is a
   single child to pin at the bottom.

   Desktop only: on a phone the column is full width and scrolls with the
   page, where a bounded inner scroller would only get in the way. */
@media (min-width: 992px) {
	body.devexhub-3d-customiser-full-active:not(.devexhub-3d-studio) form.cart {
		display: flex;
		flex-direction: column;
		/* The theme ships form.cart as `flex-wrap: wrap; align-items:
		   center` for its normal inline quantity + button row. Left alone,
		   a column that overflows its max-height wraps into a SECOND
		   column beside itself — which is exactly what threw the buy bar
		   out to the right of the panel. */
		flex-wrap: nowrap;
		align-items: stretch;
		gap: 0;
		/* Matches the theme's own sticky offset so the bar lands just
		   inside the viewport rather than below its fold. */
		max-height: calc(100vh - var(--header-h, 80px) - 48px);
	}
	/* min-height:0 is what actually lets a flex child scroll — without it
	   the panel expands to its content and the footer is pushed off. */
	body.devexhub-3d-customiser-full-active:not(.devexhub-3d-studio) form.cart > #devexhub-3d-customiser-panel {
		flex: 1 1 auto;
		min-height: 0;
		overflow-y: auto;
	}
	body.devexhub-3d-customiser-full-active:not(.devexhub-3d-studio) .devexhub-3d-customiser-buybar {
		position: static;
		flex: 0 0 auto;
		display: flex;
		align-items: center;
		gap: 10px;
		width: 100%;
		margin: 12px 0 0;
		padding: 12px 14px;
		background: #fff;
		border: 1px solid var(--devexhub-3d-customiser-line, #e3e6ec);
		border-radius: 14px;
		box-shadow: 0 -6px 18px rgba(20, 24, 40, 0.08);
	}
	body.devexhub-3d-customiser-full-active:not(.devexhub-3d-studio) .devexhub-3d-customiser-buybar .quantity {
		margin: 0;
		flex: 0 0 auto;
	}
	body.devexhub-3d-customiser-full-active:not(.devexhub-3d-studio) .devexhub-3d-customiser-buybar .single_add_to_cart_button {
		margin: 0;
		flex: 1 1 auto;
		white-space: nowrap;
	}
	body.devexhub-3d-customiser-full-active:not(.devexhub-3d-studio) #devexhub-3d-customiser-cart-hint {
		display: none;
	}
}

@media (min-width: 861px) {
	body.devexhub-3d-studio {
		--dx-rail: 360px;
	}

	.devexhub-3d-studio-shell {
		grid-template-columns: var(--dx-rail) minmax(0, 1fr) auto;
	}

	/* The name and the icons shift out of the rail's column. */
	.dx-studio-ident { grid-column: 2; grid-row: 1; }
	.dx-studio-tools { grid-column: 3; grid-row: 1; }
	.dx-studio-summary { grid-column: 3; grid-row: 2; }

	.dx-studio-deck {
		grid-column: 1;
		grid-row: 1 / -1;
		align-self: stretch;
		max-height: none;
		padding: 0;
		display: flex;
		flex-direction: column;
		overflow: hidden;           /* the body inside does the scrolling */
	}

	/* The stepper is a bottom-deck idea: with the whole list in view at
	   once, "< Colour 2 / 5 >" is telling the shopper what they can
	   already see. */
	.devexhub-3d-studio .dx-studio-stepper { display: none !important; }

	/* Collapse still works, it just folds sideways now. */
	.dx-studio-deck__toggle { top: 12px; right: 12px; }
	.dx-studio-deck.is-collapsed {
		grid-row: 1;
		align-self: start;
		width: auto;
		padding: 0;
	}
	body.dx-deck-collapsed .devexhub-3d-studio-shell {
		grid-template-columns: auto minmax(0, 1fr) auto;
	}

	.dx-studio-deck__panel {
		flex: 1 1 auto;
		min-height: 0;
		overflow-y: auto;
		overscroll-behavior: contain;
		padding: 18px 18px 18px;
	}

	/* --- Level 1: the step list ------------------------------------- */
	.devexhub-3d-studio #devexhub-3d-customiser-steps {
		display: flex;
		flex-direction: column;
		gap: 12px;
		border: 0;
		padding: 0;
		margin: 0;
		overflow: visible;
	}
	.devexhub-3d-studio #devexhub-3d-customiser-steps .devexhub-3d-customiser-step-btn {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 2px;
		width: 100%;
		padding: 18px 14px;
		border: 1px solid var(--dx-line);
		border-radius: 4px;
		background: #fff;
		box-shadow: 0 1px 2px rgba(19, 19, 19, .05);
		cursor: pointer;
		transition: border-color .2s ease, box-shadow .2s ease;
	}
	.devexhub-3d-studio #devexhub-3d-customiser-steps .devexhub-3d-customiser-step-btn:hover {
		border-color: #131313;
		box-shadow: 0 2px 10px rgba(19, 19, 19, .1);
	}
	/* No active highlight on the list: the list is only ever on screen
	   when NO step is open, so highlighting one would point at nothing. */
	.devexhub-3d-studio #devexhub-3d-customiser-steps .devexhub-3d-customiser-step-btn.is-active-step-btn {
		border-color: var(--dx-line);
		background: #fff;
	}
	.devexhub-3d-studio .devexhub-3d-customiser-step-btn-label {
		font-size: 15px;
		font-weight: 700;
		letter-spacing: .04em;
		text-transform: uppercase;
		color: #131313;
	}
	.devexhub-3d-studio .devexhub-3d-customiser-step-btn-required {
		font-size: 11px;
		font-weight: 500;
		letter-spacing: 0;
		text-transform: none;
		color: #e2576b;
	}

	/* --- Level 2: one step, open ------------------------------------ */
	/* The rail shows either the list or an open step, never both -- that
	   is what "Back To Menu" is the way out of. */
	body.dx-rail-open #devexhub-3d-customiser-steps { display: none; }
	body.devexhub-3d-studio:not(.dx-rail-open) #devexhub-3d-customiser-step-panels { display: none; }

	/* The open step's name, in the rail's header strip. */
	.dx-rail-head {
		flex: 0 0 auto;
		display: none;
		align-items: center;
		justify-content: center;
		padding: 16px 52px;
		border-bottom: 1px solid var(--dx-line);
		background: #fff;
		font-size: 15px;
		font-weight: 700;
		letter-spacing: .04em;
		text-transform: uppercase;
	}
	body.dx-rail-open .dx-rail-head { display: flex; }
	body.dx-rail-open .dx-studio-deck__panel { padding-top: 18px; }

	/* Back To Menu, pinned under the scroll so it never scrolls away. */
	.dx-rail-back {
		flex: 0 0 auto;
		display: none;
		align-items: center;
		justify-content: center;
		gap: 10px;
		margin: 0;
		padding: 16px;
		border: 0;
		border-top: 1px solid var(--dx-line);
		background: #fff;
		color: #131313;
		font-size: 14px;
		cursor: pointer;
	}
	body.dx-rail-open .dx-rail-back { display: flex; }
	.dx-rail-back:hover { background: #f6f6f4; }
}

@media (min-width: 861px) {
	body.devexhub-3d-studio {
		/* The summary card's own width. */
		--dx-aside: 336px;
	}
	/* Both edges clear their column AND the shell's gutter -- the rail and
	   the card are inset by it, so measuring from the viewport edge alone
	   left the stage running a gutter's width underneath each. */
	.devexhub-3d-studio .devexhub-3d-studio-stage {
		left: calc(var(--dx-rail) + var(--dx-gutter));
		right: calc(var(--dx-aside) + var(--dx-gutter));
	}
	/* Folded away, the rail gives its column back. */
	body.dx-deck-collapsed .devexhub-3d-studio-stage { left: 0; }
}

/* The rail scrolls, the page does not.
   Without a fixed height the shell simply grew to whatever the longest
   material list needed -- 1462px against a 1027px window -- so the whole
   page scrolled and the rail's own scroll area never engaged, taking the
   model and the summary card off screen with it. */
@media (min-width: 861px) {
	body.devexhub-3d-studio { overflow: hidden; }
	.devexhub-3d-studio .devexhub-3d-studio-shell {
		height: 100dvh;
		min-height: 0;
		overflow: hidden;
	}
	.devexhub-3d-studio .dx-studio-deck { max-height: 100%; }
}

/* Narrow desktops: give the model back some room.
   A 360px rail plus a 336px card leaves barely 240px of stage on a
   900px-wide window, and the garment is sized to the width it can see --
   so it came out tiny. Both panels give ground before the model does. */
@media (min-width: 861px) and (max-width: 1240px) {
	body.devexhub-3d-studio {
		--dx-rail: 290px;
		--dx-aside: 268px;
	}
	.devexhub-3d-studio .dx-studio-summary { width: var(--dx-aside); }
	.devexhub-3d-studio #devexhub-3d-customiser-zone-detail-title { padding: 8px 10px; font-size: 13px; }
	.devexhub-3d-studio .devexhub-3d-customiser-colour-circle { width: 38px; height: 38px; }
	.devexhub-3d-studio .devexhub-3d-customiser-zone-action-btn { padding: 12px 8px; font-size: 13px; }
}

/* ==========================================================================
 *  3. MOBILE
 *  @media (max-width: ...) - phones and tablets only.
 * ========================================================================== */

@media (max-width: 560px) {
	#devexhub-3d-customiser-steps {
		flex-wrap: nowrap;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		margin-inline: -22px;
		padding-inline: 22px;
	}
	.devexhub-3d-customiser-step-btn {
		flex: none;
	}
}

/* -- Responsive --------------------------------------------------------------
   Under this width, WooCommerce/the theme stack the gallery above the
   options rather than side-by-side, which is exactly the layout that used to
   force a shopper to scroll down to change a color, then back up to see it
   on the model. The fix is two sticky anchors: the 3D canvas pins to the top
   of the screen (it never scrolls out of view while picking options below
   it), and a Total + Add to Cart bar pins to the bottom (no need to scroll
   all the way down to buy, or to re-check the price). */
@media (max-width: 781px) {
	/* On mobile, the product title (and short description, if the theme
	   prints one) just push the price/options further down the screen
	   before the shopper reaches anything useful. Hide them here only --
	   desktop is untouched, and every other product's page is untouched
	   since this is scoped to the body class this plugin adds. Covers the
	   classic WooCommerce title markup and the block-theme/Woo-Blocks
	   equivalents so it works regardless of which template renders it. */
	body.devexhub-3d-customiser-active .product_title,
	body.devexhub-3d-customiser-active h1.entry-title,
	body.devexhub-3d-customiser-active .wp-block-post-title,
	body.devexhub-3d-customiser-active .woocommerce-product-details__short-description,
	body.devexhub-3d-customiser-active .woocommerce-breadcrumb {
		display: none !important;
	}

	#devexhub-3d-customiser-gallery {
		position: sticky;
		top: var(--wp-admin--admin-bar--height, 0px);
		z-index: 40;
		background: #fff;
		padding-bottom: 6px;
		box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
	}
	/* Once JS has moved the gallery to be the first child of the (much
	   taller) options panel — see relocateGalleryIntoPanelOnMobile() in
	   customizer.js — give it a little breathing room from the first
	   section's heading right below it. */
	#devexhub-3d-customiser-gallery.devexhub-3d-customiser-gallery-nested {
		margin: -16px -16px 14px -16px;
		border-radius: var(--devexhub-3d-customiser-radius) var(--devexhub-3d-customiser-radius) 0 0;
	}
	#devexhub-3d-customiser-canvas-wrap {
		aspect-ratio: unset;
		height: 40vh;
		min-height: 240px;
		max-height: 320px;
	}
	.devexhub-3d-customiser-badge {
		font-size: 10.5px;
		padding: 4px 8px;
	}
	.devexhub-3d-customiser-size-chart-link {
		padding: 5px 12px;
		font-size: 11px;
	}

	/* Panel: roomier tap targets, one comfortably-scrollable column, and
	   enough bottom padding that the last section never sits under the
	   fixed mobile bar. */
	#devexhub-3d-customiser-panel {
		padding: 16px;
		padding-bottom: 88px;
	}
	.devexhub-3d-customiser-panel-section h4 {
		font-size: 13.5px;
	}

	/* Zone tabs and Production Options: one horizontally-scrollable row
	   instead of wrapping — keeps each section short so there's less
	   distance between "change something" and the sticky canvas above it. */
	#devexhub-3d-customiser-zone-tabs,
	#devexhub-3d-customiser-material-options,
	#devexhub-3d-customiser-production-options {
		flex-wrap: nowrap;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		padding-bottom: 2px;
	}
	#devexhub-3d-customiser-zone-tabs::-webkit-scrollbar,
	#devexhub-3d-customiser-material-options::-webkit-scrollbar,
	#devexhub-3d-customiser-production-options::-webkit-scrollbar,
	#devexhub-3d-customiser-crystal-options::-webkit-scrollbar {
		display: none;
	}
	.devexhub-3d-customiser-tab,
	.devexhub-3d-customiser-option-btn {
		flex: none;
		min-height: 40px;
	}
	#devexhub-3d-customiser-crystal-options,
	#devexhub-3d-customiser-sleeve-options {
		display: flex;
		flex-wrap: nowrap;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}
	#devexhub-3d-customiser-crystal-options .devexhub-3d-customiser-option-btn,
	#devexhub-3d-customiser-sleeve-options .devexhub-3d-customiser-option-btn {
		flex: none;
		min-height: 0;
	}

	/* Text color / text size rows: at narrow widths a fixed-content label
	   sitting next to a whole row of swatches (or a slider) has nowhere to
	   shrink, and used to collapse into a single vertical column of
	   letters. Stacking label-above-control avoids that squeeze entirely. */
	.devexhub-3d-customiser-text-color-row,
	.devexhub-3d-customiser-text-size-row {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}
	#devexhub-3d-customiser-text-color-options {
		flex-wrap: wrap;
		width: 100%;
	}
	.devexhub-3d-customiser-text-size-row input[type='range'] {
		width: 100%;
	}
	#devexhub-3d-customiser-zone-options {
		grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
	}
	.devexhub-3d-customiser-swatch-card {
		min-height: 64px;
	}

	/* The in-panel total row still exists on mobile (useful once scrolled
	   deep into the panel) but the sticky bottom bar is the primary,
	   always-visible one — de-emphasize this one slightly. */
	#devexhub-3d-customiser-summary {
		margin-top: 12px;
	}

	/* WooCommerce's own Add to Cart button is redundant with the sticky bar
	   below on this product's mobile view — hide it there specifically
	   (every other product's button is untouched). */
	body.devexhub-3d-customiser-active .single_add_to_cart_button {
		display: none !important;
	}

	#devexhub-3d-customiser-mobile-bar {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 14px;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 999;
		background: #fff;
		border-top: 1px solid rgba(0, 0, 0, 0.08);
		box-shadow: 0 -6px 16px rgba(0, 0, 0, 0.12);
		padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
	}
	#devexhub-3d-customiser-mobile-bar-total {
		display: flex;
		flex-direction: column;
		line-height: 1.2;
	}
	.devexhub-3d-customiser-mobile-bar-label {
		font-size: 11px;
		text-transform: uppercase;
		letter-spacing: 0.04em;
		color: var(--devexhub-3d-customiser-ink-soft);
	}
	#devexhub-3d-customiser-mobile-bar-price {
		font-size: 19px;
		font-weight: 700;
		color: var(--devexhub-3d-customiser-ink);
	}
	.devexhub-3d-customiser-mobile-bar-btn {
		flex: none;
		background: var(--devexhub-3d-customiser-ink, #141414);
		color: #fff;
		border: none;
		border-radius: 999px;
		padding: 13px 28px;
		font-size: 14.5px;
		font-weight: 700;
		cursor: pointer;
	}
	.devexhub-3d-customiser-mobile-bar-btn:active {
		opacity: 0.85;
	}
}

@media (max-width: 480px) {
	#devexhub-3d-customiser-canvas-wrap {
		height: 34vh;
		min-height: 210px;
	}
	#devexhub-3d-customiser-panel {
		padding: 14px;
		padding-bottom: 84px;
	}
	#devexhub-3d-customiser-gallery.devexhub-3d-customiser-gallery-nested {
		margin: -14px -14px 12px -14px;
	}
	#devexhub-3d-customiser-zone-options {
		grid-template-columns: repeat(auto-fill, minmax(66px, 1fr));
	}
	.devexhub-3d-customiser-mobile-bar-btn {
		padding: 12px 22px;
		font-size: 14px;
	}
}

@media (max-width: 782px) {
	.devexhub-3d-customiser-validation-errors {
		margin-bottom: 90px; /* keep it clear of the sticky mobile Add to Cart bar */
	}
}

@media (max-width: 782px) {
	.devexhub-3d-customiser-tour-help-btn {
		bottom: 96px; /* clear of the sticky mobile Add to Cart bar */
	}
}

@media (max-width: 780px) {
	.devexhub-3d-customiser-semi-modal-box {
		flex-direction: column;
		max-height: 92vh;
		overflow-y: auto;
	}
	.devexhub-3d-customiser-semi-modal-options {
		border-left: none;
		border-top: 1px solid var(--devexhub-3d-customiser-line, #e5e7ec);
		overflow: visible;
	}
	.devexhub-3d-customiser-semi-modal-options #devexhub-3d-customiser-panel {
		overflow-y: visible;
	}
	#devexhub-3d-customiser-popup-cart-bar {
		position: sticky;
		bottom: 0;
	}
}

/* The stepper replaces the old tab strip and the in-panel summary has
   moved to the card, so neither is rendered twice. */
/* The step strip is hidden only where the stepper stands in for it --
   on a phone. The desktop rail IS this list, so it stays. */
@media (max-width: 860px) {
	.devexhub-3d-studio #devexhub-3d-customiser-steps { display: none !important; }
	.devexhub-3d-studio .devexhub-3d-customiser-zone-actions {bottom: -6px;padding: 6px 0;}
    .devexhub-3d-studio .devexhub-3d-customiser-swatch-card { max-width: 80px;}
    .devexhub-3d-studio #devexhub-3d-customiser-zone-preview { bottom: 50.7px;}

   .devexhub-3d-customiser-tour-help-btn {
    bottom: 44%;
    right: 88%;
}
}

@media (max-width: 860px) {
	.devexhub-3d-studio .devexhub-3d-customiser-badge { top: 62px; }
}

/* ---------------------------------------------------------------------
   Phones
   --------------------------------------------------------------------- */
@media (max-width: 860px) {
	.devexhub-3d-studio-shell {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: auto minmax(0, 1fr) auto auto;
		gap: 12px;
		padding: 0;
	}
	.dx-studio-ident { grid-column: 1; grid-row: 1; }
	.dx-studio-tools { grid-column: 1; grid-row: 1; justify-self: end; }

	/* The card becomes a sheet the Information button opens. */
	.dx-studio-summary {
		position: fixed;
		left: 12px; right: 12px; bottom: 12px;
		width: auto;
		z-index: 30;
		max-height: 70vh;
		box-shadow: 0 24px 48px rgba(4, 14, 73, .22);
		transform: translateY(calc(100% + 24px));
		transition: transform .35s cubic-bezier(.16, 1, .3, 1);
	}
	.dx-studio-summary.is-open { transform: none; }
	.dx-studio-summary__close { display: block; }
	.dx-studio-summary__foot { display: none; }

	.dx-studio-mobile-actions {
		grid-column: 1;
		grid-row: 3;
		display: flex;
		gap: 10px;
		padding-inline: 16px;
	}
	.dx-studio-mobile-btn {
		flex: 1 1 0;
		padding: 12px 10px;
		border: 1px solid #131313;
		border-radius: 2px;
		background: #131313;
		color: #fff;
		font-size: 11px;
		font-weight: 600;
		letter-spacing: .1em;
		text-transform: uppercase;
		cursor: pointer;
	}
	.dx-studio-mobile-btn--primary { background: var(--dx-ink); border-color: var(--dx-ink); }

	/* The sheet takes 35% of the screen and the model keeps 65%, and the
	   shopper can change that ratio by dragging the grip at its top. The
	   height is a custom property rather than a fixed rule so the drag can
	   write to one value and let the grid reflow. */
	.dx-studio-deck {
		grid-column: 1;
		grid-row: 4;
		padding: 22px 14px 16px;
		height: var(--dx-sheet, 35dvh);
		max-height: none;
		display: flex;
		flex-direction: column;
		overflow: hidden;
		z-index: -1;
	}
	.dx-studio-deck .dx-studio-deck__panel {
		flex: 1 1 auto;
		min-height: 0;
		overflow-y: auto;
		overscroll-behavior: contain;
	}
	.dx-studio-deck.is-dragging { transition: none; }

	/* The grip. A wide, full-width target rather than the bar alone --
	   a 4px line is not something a thumb can find. */
	.dx-sheet-grip {
		position: absolute;
		top: 0; left: 0; right: 0;
		height: 22px;
		display: flex;
		align-items: center;
		justify-content: center;
		border: 0;
		padding: 0;
		background: none;
		cursor: grab;
		touch-action: none;
		z-index: 4;
	}
	.dx-sheet-grip::before {
		content: '';
		width: 40px;
		height: 4px;
		border-radius: 100px;
		background: #d4d4d0;
	}
	.dx-sheet-grip:active { cursor: grabbing; }
	.dx-studio-deck.is-collapsed .dx-sheet-grip { display: none; }
	/* The toggle sits beside the grip rather than under it. */
	.dx-studio-deck__toggle { top: 22px; }
	.dx-studio-deck__toggle { top: 8px; right: 8px; }
	body.dx-deck-collapsed .dx-studio-stage-tools { top: 96px; bottom: auto; }
	.dx-studio-mask { height: 30vh; }

	/* The plugin's own fixed phone bar (total + Add to Cart) is the inline
	   product page's answer to the same problem. Here the actions row
	   above the deck already carries Add to Cart and the summary sheet
	   carries the total, so the old bar is a duplicate that also sat on
	   top of the deck. */
	.devexhub-3d-studio #devexhub-3d-customiser-mobile-bar { display: none !important; }

	/* The zoom and size-chart controls sat on the garment's shoulder at
	   the top of the stage. On a phone they join the layout as a real grid
	   row instead, tucked against the bottom-right of the stage where
	   there is nothing behind them. */
		.dx-studio-stage-tools {
		    left: 100%;
		    bottom: 43vh;
		    transform: translateX(-147px);
		}
	body.dx-deck-collapsed .dx-studio-stage-tools { top: auto; bottom: auto; }

	/* Side-scrolling rows rather than three cramped wrapped lines. */
	.devexhub-3d-studio .devexhub-3d-customiser-swatch-grid {
		flex-wrap: nowrap;
		justify-content: flex-start;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		padding-bottom: 2px;
	}
	.devexhub-3d-studio .devexhub-3d-customiser-swatch-grid::-webkit-scrollbar { display: none; }
	.devexhub-3d-studio .devexhub-3d-customiser-swatch,
	.devexhub-3d-studio .devexhub-3d-customiser-option-btn { flex: 0 0 auto; }
}

@media (max-width: 900px) {
	#devexhub-3d-customiser-graphic-grid {
		grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
	}
	#devexhub-3d-customiser-font-options {
		grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
	}
}

@media (max-width: 480px) {
	.devexhub-3d-design-row { flex-wrap: wrap; }
	.devexhub-3d-design-row__actions { width: 100%; }
	.devexhub-3d-design-row__actions .button { width: 100%; text-align: center; }
}

@media (max-width: 860px) {
	/* The pill is hidden at this width (see above), so there is nothing to
	   clear and the link returns to the corner. */
	.devexhub-3d-studio .devexhub-3d-customiser-size-chart-link {
		top: 12px;
	}
}

@media (max-width: 860px) {
	/* On a phone the stack would eat the model, so it becomes one compact
	   row across the top of the stage instead, and the pill comes back --
	   it was hidden at this width only because it used to overlap. */
	/* Bottom of the stage on a phone, not the top: the top-left corner is
	   the "360 - drag to rotate" hint, and a stack across the top ran
	   straight over it. The bottom strip is empty and the model sits above
	   it. */
	.devexhub-3d-studio-hud {
		top: auto;
		bottom: 10px;
		right: 10px;
		left: 10px;
		flex-direction: row;
		align-items: center;
		justify-content: flex-end;
		flex-wrap: wrap;
		gap: 8px;
	}
	/* The pill stays hidden here, as it already was: the fixed buy bar at
	   the bottom of a phone shows the same total, and a second copy over
	   the model only covered the "drag to rotate" hint. */
	.devexhub-3d-studio-hud__btn { width: 34px; height: 34px; }
	.devexhub-3d-studio-hud__btn svg { width: 16px; height: 16px; }
}

/* On a phone the rail's variables are not set, so scope the two that the
   sheet also needs. */
@media (max-width: 860px) {
	.devexhub-3d-studio .devexhub-3d-customiser-colour-circles { grid-template-columns: repeat(5, 1fr); }
	.devexhub-3d-studio .devexhub-3d-customiser-swatch-grid {
		grid-template-columns: repeat(3, 1fr);
		flex-wrap: initial;
		overflow-x: visible;
		padding: 0 5px;
	}
}

/* On a phone the options sheet sits OVER the full-bleed stage, so the
   model's actual room ends where the buttons begin -- not at the bottom of
   the screen. buildSheetGrip() keeps --dx-stage-floor in step with the
   drag, and the re-fit in onResize() sizes the garment to what is left. */
@media (max-width: 860px) {
	.devexhub-3d-studio .devexhub-3d-studio-stage {
		bottom: var(--dx-stage-floor, 47dvh);
	}
}

/* --- Phones: the rail is narrower, so fonts go one per row --------- */
@media (max-width: 860px) {
	.devexhub-3d-customiser-text-line { padding: 14px; }
	.devexhub-3d-customiser-text-line__fonts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* ===================================================================
 *  September 2026 fixes
 *
 *  Everything below is additive and lives at the end of the file on
 *  purpose: the studio override further up shares its specificity with
 *  the rules it was accidentally beating, so the reliable fix is to
 *  restate the winner last rather than to escalate selectors.
 * =================================================================== */

/* --- Production speed: the chosen tier has to LOOK chosen -----------
   `.devexhub-3d-studio .devexhub-3d-customiser-option-btn` (white
   background, dark text) and `.devexhub-3d-customiser-option-btn.is-active`
   (accent background, white text) have exactly the same specificity, and
   the studio rule comes later in the file -- so on the customiser page it
   won, and Production / Express / Super Express showed no selected state at
   all. Crystals and sleeves escaped it only because their rules are scoped
   by an id. `.is-selected` is kept alongside `.is-active` because the
   studio stylesheet already referenced it. */
.devexhub-3d-studio .devexhub-3d-customiser-option-btn.is-active,
.devexhub-3d-studio .devexhub-3d-customiser-option-btn.is-selected {
	background: var(--devexhub-3d-customiser-accent);
	border-color: var(--devexhub-3d-customiser-accent);
	color: #fff;
}

.devexhub-3d-studio #devexhub-3d-customiser-production-options {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.devexhub-3d-studio #devexhub-3d-customiser-production-options .devexhub-3d-customiser-option-btn.is-active
	.devexhub-3d-customiser-option-price {
	opacity: .9;
}

/* --- Game Day: date picker (range set from backend settings) --------- */
.devexhub-3d-customiser-gameday-input {
	box-sizing: border-box;
	min-height: 44px;
	max-width: 100%;
	width: 100%;
	max-width: 260px;
	font-size: 16px; /* stops iOS zooming on focus */
}
@media (max-width: 781px) {
	.devexhub-3d-customiser-gameday-input { max-width: none; }
}

/* --- Text lines: delete, and reset the angle ------------------------ */
.devexhub-3d-customiser-text-line__remove svg {
	width: 15px;
	height: 15px;
}

.devexhub-3d-customiser-text-line__reset {
	margin-left: auto;
	padding: 3px 9px;
	border: 1px solid var(--devexhub-3d-customiser-line, #e4e4e2);
	border-radius: 100px;
	background: #fff;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #6b6b70;
	cursor: pointer;
	transition: border-color .15s ease, color .15s ease;
}

.devexhub-3d-customiser-text-line__reset:hover {
	border-color: #131313;
	color: #131313;
}

/* The Angle label now carries that Reset control, so it has to be a row
   rather than a plain text node. */
.devexhub-3d-customiser-text-line__control
	.devexhub-3d-customiser-text-color-label:has(.devexhub-3d-customiser-text-line__reset) {
	display: flex;
	align-items: center;
	gap: 8px;
}

/* Fallback for browsers without :has() -- the button still reads fine
   inline, it just does not sit hard right. */
.devexhub-3d-customiser-text-line__reset {
	vertical-align: middle;
}

/* --- Toast messages ------------------------------------------------
   Used for validation on phones (where a message printed under the field
   it belongs to is usually off screen) and for Save confirmations
   everywhere. Auto-hides; see TOAST_VISIBLE_MS in customizer.js. */
.devexhub-3d-customiser-toast {
	position: fixed;
	left: 50%;
	bottom: 96px;
	z-index: 100000;
	max-width: min(420px, calc(100vw - 32px));
	padding: 12px 18px;
	border-radius: 12px;
	background: #131313;
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
	text-align: center;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .28);
	transform: translate(-50%, 12px);
	opacity: 0;
	pointer-events: none;
	transition: opacity .2s ease, transform .2s ease;
}

.devexhub-3d-customiser-toast.is-visible {
	opacity: 1;
	transform: translate(-50%, 0);
}

.devexhub-3d-customiser-toast.is-error {
	background: #b32d2e;
}

/* Where the problem is. A pointer, not a state -- customizer.js takes it
   off again a moment later. */
.devexhub-3d-customiser-flash {
	animation: devexhub-3d-customiser-flash 1.4s ease-out 1;
	border-radius: 10px;
}

@keyframes devexhub-3d-customiser-flash {
	0%, 100% { box-shadow: 0 0 0 0 rgba(179, 45, 46, 0); }
	15%, 55% { box-shadow: 0 0 0 3px rgba(179, 45, 46, .55); }
}

@media (prefers-reduced-motion: reduce) {
	.devexhub-3d-customiser-toast { transition: none; }
	.devexhub-3d-customiser-flash { animation: none; outline: 2px solid rgba(179, 45, 46, .55); }
}

@media (max-width: 781px) {
	/* The customiser's own thumbnail strip of the product's photographed
	   angles. Inside the customiser on a phone it pushed the options down
	   for no benefit -- the shopper is looking at the live 3D model, not at
	   stock photos. This is the plugin's own strip only: WooCommerce's
	   gallery on the normal product page is a different element entirely
	   and is untouched. */
	#devexhub-3d-customiser-photo-strip,
	#devexhub-3d-customiser-photo-lightbox {
		display: none !important;
	}

	/* Clear of the pinned Add to Cart bar. */
	.devexhub-3d-customiser-toast {
		bottom: 104px;
	}
}


/* --- Game Day picker for iOS (Safari ignores min/max on its own picker) --- */
.devexhub-3d-customiser-gameday-native-hidden { position: absolute !important; opacity: 0 !important; pointer-events: none !important; width: 1px !important; height: 1px !important; }
.devexhub-3d-customiser-gameday-display { display: block; text-align: left; padding: 8px 12px; border: 1px solid rgba(0,0,0,.15); border-radius: 6px; background: #fff; color: #1f2a44; margin-top: 4px; cursor: pointer; }
.devexhub-3d-customiser-gameday-display.is-empty { color: #8a8f99; }
.devexhub-3d-customiser-dp { position: fixed; inset: 0; z-index: 100000; background: rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center; padding: 16px; }
.devexhub-3d-customiser-dp__sheet { width: 100%; max-width: 360px; background: #fff; border-radius: 20px; padding: 18px 16px 14px; box-shadow: 0 20px 50px rgba(0,0,0,.25); font-family: inherit; }
.devexhub-3d-customiser-dp__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.devexhub-3d-customiser-dp__title { font-size: 17px; font-weight: 700; color: #111; }
.devexhub-3d-customiser-dp__nav button { width: 38px; height: 38px; border: 0; background: transparent; font-size: 28px; line-height: 1; color: #1f2a44; cursor: pointer; }
.devexhub-3d-customiser-dp__nav button:disabled { opacity: .25; cursor: default; }
.devexhub-3d-customiser-dp__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.devexhub-3d-customiser-dp__dow { font-size: 11px; font-weight: 600; color: #8a8f99; padding: 4px 0 6px; }
.devexhub-3d-customiser-dp__day { height: 40px; border: 0; border-radius: 50%; background: transparent; font-size: 17px; color: #111; cursor: pointer; padding: 0; }
.devexhub-3d-customiser-dp__day:disabled { color: #c9ccd2; cursor: default; }
.devexhub-3d-customiser-dp__day.is-active { background: #1f2a44; color: #fff; font-weight: 600; }
.devexhub-3d-customiser-dp__foot { display: flex; justify-content: space-between; margin-top: 12px; }
.devexhub-3d-customiser-dp__foot button { border: 0; border-radius: 999px; padding: 10px 18px; font-size: 15px; cursor: pointer; }
.devexhub-3d-customiser-dp__reset { background: #f0f0f2; color: #111; }
.devexhub-3d-customiser-dp__done { background: #1f2a44; color: #fff; }