/* Phox Product Addons — frontend design system
   8px spacing scale, themable via CSS custom properties. */

.phox-addons {
	--phox-accent: var(--wp--preset--color--primary, #2563eb);
	--phox-text: #1f2937;
	--phox-text-soft: #6b7280;
	--phox-border: #e5e7eb;
	--phox-bg: #ffffff;
	--phox-bg-soft: #f9fafb;
	--phox-radius: 10px;
	--phox-radius-sm: 8px;
	--phox-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .1);
	--phox-shadow-lg: 0 4px 6px -2px rgba(16, 24, 40, .05), 0 12px 16px -4px rgba(16, 24, 40, .1);
	--phox-error: #dc2626;
	--phox-transition: .18s cubic-bezier(.4, 0, .2, 1);

	margin: 16px 0 24px;
	font-size: 15px;
	color: var(--phox-text);
	line-height: 1.5;
	width: 100%;
}

/* ---------- Theme armour (Breakdance / Woo bleed-through) ----------
   The single-product summary skins native controls and form labels and caps
   the add-to-cart form width. These resets are scoped to .phox-addons so the
   design system renders the same inside any builder/theme. */

/* Builders skin native checkboxes/radios with an SVG background, a fixed size
   and custom appearance. Ours are custom spans, so fully collapse the native
   inputs we visually replace (we also position:absolute + opacity:0 below). */
.phox-addons input[type="checkbox"],
.phox-addons input[type="radio"] {
	-webkit-appearance: none !important;
	appearance: none !important;
	width: 0 !important;
	height: 0 !important;
	min-width: 0 !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: none !important;
	box-shadow: none !important;
}

/* Our option / toggle / card / swatch wrappers are <label>s. Theme rules such
   as `label { display:block }` outrank our class selectors and stack the parts
   vertically — re-assert the flex layout. (Margins/padding stay from the
   component rules, so row spacing is untouched.) */
.phox-addons .phox-check,
.phox-addons .phox-option,
.phox-addons .phox-toggle,
.phox-addons .phox-card,
.phox-addons .phox-swatch { display: flex !important; }
.phox-addons .phox-button-group__button { display: inline-flex !important; }

/* Builders cap the add-to-cart form width via --bde-woo-forms__wrappers-small,
   making the addon form narrower than the title/price. Use the full column. */
form.cart:has(.phox-addons) {
	max-width: none !important;
	width: 100%;
}
.phox-addons .phox-input,
.phox-addons .phox-select {
	width: 100%;
	max-width: none !important;
}

/* ---------- Groups ---------- */
.phox-group { margin-bottom: 24px; }
.phox-group__title { font-size: 17px; font-weight: 600; margin: 0 0 4px; }
.phox-group__description { color: var(--phox-text-soft); font-size: 14px; margin: 0 0 16px; }

/* ---------- Fields ---------- */
.phox-field { margin-bottom: 16px; transition: opacity var(--phox-transition); }
.phox-field--hidden { display: none; }
.phox-field__label { display: block; font-weight: 500; margin-bottom: 8px; }
.phox-field__required { color: var(--phox-error); margin-left: 2px; }
.phox-field__description { display: block; color: var(--phox-text-soft); font-size: 13px; margin: -4px 0 8px; }
.phox-field__error { display: block; color: var(--phox-error); font-size: 13px; margin-top: 4px; min-height: 0; }
.phox-field--invalid .phox-input,
.phox-field--invalid .phox-image-dropdown__trigger { border-color: var(--phox-error); }

/* ---------- Inputs ---------- */
.phox-input {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid var(--phox-border);
	border-radius: var(--phox-radius-sm);
	background: var(--phox-bg);
	font-size: 15px;
	color: var(--phox-text);
	transition: border-color var(--phox-transition), box-shadow var(--phox-transition);
}
.phox-input:focus {
	outline: none;
	border-color: var(--phox-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--phox-accent) 18%, transparent);
}
.phox-textarea { resize: vertical; min-height: 80px; }

/* ---------- Price tags ---------- */
.phox-price-tag {
	display: inline-block;
	margin-left: 8px;
	padding: 2px 8px;
	font-size: 12px;
	font-weight: 600;
	color: var(--phox-accent);
	background: color-mix(in srgb, var(--phox-accent) 10%, transparent);
	border-radius: 999px;
	white-space: nowrap;
}

/* Product Options on sale: regular price struck through beside the sale price. */
.phox-price-tag--sale {
	display: inline-flex;
	align-items: baseline;
	gap: 6px;
}
.phox-price-tag--sale del {
	opacity: .6;
	font-weight: 500;
	text-decoration: line-through;
}
.phox-price-tag--sale ins {
	text-decoration: none;
}

.phox-badge {
	display: inline-block;
	padding: 2px 8px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .03em;
	color: #fff;
	background: var(--phox-accent);
	border-radius: 999px;
}

/* ---------- Checkbox / option rows ---------- */
.phox-check, .phox-option {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	border: 1px solid var(--phox-border);
	border-radius: var(--phox-radius-sm);
	cursor: pointer;
	background: var(--phox-bg);
	transition: border-color var(--phox-transition), background var(--phox-transition);
	margin-bottom: 8px;
}
.phox-check:hover, .phox-option:hover { border-color: var(--phox-accent); }
.phox-check input, .phox-option input { position: absolute; opacity: 0; pointer-events: none; }

.phox-check__box, .phox-option__control {
	flex: 0 0 18px;
	width: 18px; height: 18px;
	border: 2px solid var(--phox-border);
	border-radius: 5px;
	background: var(--phox-bg);
	transition: all var(--phox-transition);
	position: relative;
}
.phox-option input[type="radio"] + .phox-option__control { border-radius: 50%; }
.phox-check input:checked + .phox-check__box,
.phox-option input:checked + .phox-option__control {
	border-color: var(--phox-accent);
	background: var(--phox-accent);
}
/* Radio: filled centre dot. */
.phox-option input[type="radio"]:checked + .phox-option__control {
	box-shadow: inset 0 0 0 3px var(--phox-bg);
}
/* Checkbox (single + group): white tick. */
.phox-check__box::after,
.phox-option__control::after {
	content: "";
	position: absolute;
	left: 50%; top: 47%;
	width: 4px; height: 8px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: translate(-50%, -55%) rotate(45deg);
	opacity: 0;
	transition: opacity var(--phox-transition);
}
.phox-check input:checked + .phox-check__box::after,
.phox-option input[type="checkbox"]:checked + .phox-option__control::after {
	opacity: 1;
}
.phox-check input:checked ~ .phox-check__label { font-weight: 500; }
.phox-option input:checked ~ .phox-option__label { font-weight: 500; }
.phox-check:has(input:checked), .phox-option:has(input:checked) {
	border-color: var(--phox-accent);
	background: color-mix(in srgb, var(--phox-accent) 4%, var(--phox-bg));
}
.phox-option__label, .phox-check__label { flex: 1; }

/* ---------- Toggle ---------- */
.phox-toggle { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.phox-toggle input { position: absolute; opacity: 0; }
.phox-toggle__track {
	flex: 0 0 44px;
	width: 44px; height: 24px;
	background: var(--phox-border);
	border-radius: 999px;
	position: relative;
	transition: background var(--phox-transition);
}
.phox-toggle__thumb {
	position: absolute;
	top: 2px; left: 2px;
	width: 20px; height: 20px;
	background: #fff;
	border-radius: 50%;
	box-shadow: var(--phox-shadow);
	transition: transform var(--phox-transition);
}
.phox-toggle input:checked + .phox-toggle__track { background: var(--phox-accent); }
.phox-toggle input:checked + .phox-toggle__track .phox-toggle__thumb { transform: translateX(20px); }

/* ---------- Button group ---------- */
.phox-button-group { display: flex; flex-wrap: wrap; gap: 8px; }
.phox-button-group__item input { position: absolute; opacity: 0; pointer-events: none; }
.phox-button-group__button {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 9px 16px;
	border: 1px solid var(--phox-border);
	border-radius: var(--phox-radius-sm);
	cursor: pointer;
	font-weight: 500;
	background: var(--phox-bg);
	transition: all var(--phox-transition);
}
.phox-button-group__button:hover { border-color: var(--phox-accent); }
.phox-button-group__item input:checked + .phox-button-group__button {
	border-color: var(--phox-accent);
	background: var(--phox-accent);
	color: #fff;
}
.phox-button-group__item input:checked + .phox-button-group__button .phox-price-tag {
	background: rgba(255, 255, 255, .2);
	color: #fff;
}

/* ---------- Visual cards ---------- */
.phox-cards {
	display: grid;
	grid-template-columns: repeat(var(--phox-cards-columns, 3), 1fr);
	gap: 12px;
}
.phox-card {
	position: relative;
	display: flex;
	flex-direction: column;
	border: 2px solid var(--phox-border);
	border-radius: var(--phox-radius);
	background: var(--phox-bg);
	cursor: pointer;
	overflow: hidden;
	transition: all var(--phox-transition);
}
.phox-card:hover { border-color: var(--phox-accent); transform: translateY(-2px); box-shadow: var(--phox-shadow-lg); }
.phox-card input { position: absolute; opacity: 0; pointer-events: none; }
.phox-card__media { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--phox-bg-soft); }
.phox-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform var(--phox-transition); }
.phox-card:hover .phox-card__media img { transform: scale(1.04); }
.phox-card__body { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; }
.phox-card__label { font-weight: 600; font-size: 14px; }
.phox-card__desc { color: var(--phox-text-soft); font-size: 13px; }
.phox-card__body .phox-price-tag { margin: 6px 0 0; align-self: flex-start; }
.phox-card__badge { position: absolute; top: 10px; right: 10px; z-index: 1; }
.phox-card__check {
	position: absolute;
	top: 10px; left: 10px;
	width: 22px; height: 22px;
	display: flex; align-items: center; justify-content: center;
	background: var(--phox-accent);
	color: #fff;
	border-radius: 50%;
	opacity: 0;
	transform: scale(.5);
	transition: all var(--phox-transition);
}
.phox-card:has(input:checked) { border-color: var(--phox-accent); box-shadow: var(--phox-shadow-lg); }
.phox-card:has(input:checked) .phox-card__check { opacity: 1; transform: scale(1); }
.phox-card--disabled { cursor: not-allowed; opacity: .55; }
.phox-card--disabled:hover { border-color: var(--phox-border); transform: none; box-shadow: none; }
.phox-card--disabled:hover .phox-card__media img { transform: none; }
.phox-card__desc--stock { color: #c62828; font-weight: 600; }

/* ---------- Swatches ---------- */
.phox-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.phox-swatch {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	max-width: 72px;
	text-align: center;
}
.phox-swatch input { position: absolute; opacity: 0; pointer-events: none; }
.phox-swatch__face {
	display: block;
	width: 44px; height: 44px;
	border-radius: 50%;
	border: 2px solid var(--phox-border);
	box-shadow: inset 0 0 0 2px var(--phox-bg);
	overflow: hidden;
	transition: all var(--phox-transition);
}
.phox-swatches--image .phox-swatch__face { border-radius: var(--phox-radius-sm); width: 56px; height: 56px; }
.phox-swatch__face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.phox-swatch:hover .phox-swatch__face { transform: scale(1.08); }
.phox-swatch input:checked ~ .phox-swatch__face {
	border-color: var(--phox-accent);
	box-shadow: inset 0 0 0 2px var(--phox-bg), 0 0 0 3px color-mix(in srgb, var(--phox-accent) 25%, transparent);
}
.phox-swatch__label { font-size: 12px; color: var(--phox-text-soft); }
.phox-swatch input:checked ~ .phox-swatch__label { color: var(--phox-text); font-weight: 600; }

/* ---------- Image dropdown ---------- */
.phox-image-dropdown { position: relative; }
.phox-image-dropdown__trigger {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 8px 14px;
	min-height: 48px;
	border: 1px solid var(--phox-border);
	border-radius: var(--phox-radius-sm);
	background: var(--phox-bg);
	cursor: pointer;
	font-size: 15px;
	color: var(--phox-text);
	transition: border-color var(--phox-transition);
}
.phox-image-dropdown__trigger:hover { border-color: var(--phox-accent); }
.phox-image-dropdown__placeholder { color: var(--phox-text-soft); flex: 1; text-align: left; }
.phox-image-dropdown__selected { flex: 1; text-align: left; font-weight: 500; }
.phox-image-dropdown__chevron { margin-left: auto; color: var(--phox-text-soft); flex: 0 0 auto; }
.phox-image-dropdown__list {
	position: absolute;
	z-index: 50;
	top: calc(100% + 6px);
	left: 0; right: 0;
	max-height: 320px;
	overflow: auto;
	margin: 0; padding: 6px;
	list-style: none;
	background: var(--phox-bg);
	border: 1px solid var(--phox-border);
	border-radius: var(--phox-radius);
	box-shadow: var(--phox-shadow-lg);
}
.phox-image-dropdown__option {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 10px;
	border-radius: var(--phox-radius-sm);
	cursor: pointer;
	transition: background var(--phox-transition);
}
.phox-image-dropdown__option:hover { background: var(--phox-bg-soft); }
.phox-image-dropdown__option.is-selected { background: color-mix(in srgb, var(--phox-accent) 8%, transparent); }
.phox-image-dropdown__thumb {
	flex: 0 0 44px;
	width: 44px; height: 44px;
	border-radius: var(--phox-radius-sm);
	object-fit: cover;
	background: var(--phox-bg-soft);
}
.phox-image-dropdown__meta { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.phox-image-dropdown__label { font-weight: 500; display: flex; align-items: center; gap: 8px; }
.phox-image-dropdown__desc { font-size: 13px; color: var(--phox-text-soft); }

/* ---------- Swatch zoom + lightbox ---------- */
.phox-swatch { position: relative; }
.phox-swatch__zoom {
	position: absolute;
	top: -4px; right: 0;
	width: 20px; height: 20px;
	display: flex; align-items: center; justify-content: center;
	border: none;
	border-radius: 50%;
	background: var(--phox-bg);
	color: var(--phox-text-soft);
	box-shadow: var(--phox-shadow);
	cursor: zoom-in;
	opacity: 0;
	transition: opacity var(--phox-transition), color var(--phox-transition);
}
.phox-swatch:hover .phox-swatch__zoom { opacity: 1; }
.phox-swatch__zoom:hover { color: var(--phox-accent); }

.phox-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100010; /* above the customise modal (100000) */
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(15, 23, 42, .75);
	padding: 24px;
}
.phox-lightbox.is-open { display: flex; }
.phox-lightbox__inner {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	max-width: min(90vw, 720px);
	max-height: 90vh;
}
.phox-lightbox__img {
	max-width: 100%;
	max-height: 78vh;
	border-radius: 12px;
	box-shadow: 0 24px 48px -12px rgba(0, 0, 0, .45);
	background: #fff;
}
.phox-lightbox__caption { color: #fff; font-size: 14px; font-weight: 500; }
.phox-lightbox__close {
	position: absolute;
	top: -14px; right: -14px;
	width: 32px; height: 32px;
	border: none;
	border-radius: 50%;
	background: #fff;
	color: #1f2937;
	font-size: 14px;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
}

/* ---------- Totals panel ---------- */
.phox-totals {
	margin-top: 16px;
	padding: 14px 16px;
	background: var(--phox-bg-soft);
	border: 1px solid var(--phox-border);
	border-radius: var(--phox-radius);
}
.phox-totals__row {
	display: flex;
	justify-content: space-between;
	font-size: 14px;
	color: var(--phox-text-soft);
	padding: 3px 0;
}
.phox-totals__row--item span:first-child {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	margin-right: 16px;
}
.phox-totals__row--grand {
	margin-top: 6px;
	padding-top: 10px;
	border-top: 1px solid var(--phox-border);
	font-size: 17px;
	font-weight: 700;
	color: var(--phox-text);
}
@keyframes phoxPulse {
	0% { transform: scale(1); }
	40% { transform: scale(1.06); }
	100% { transform: scale(1); }
}
.phox-pulse { display: inline-block; animation: phoxPulse .35s ease; }

/* ---------- Upload ---------- */
.phox-upload__zone {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 24px 16px;
	border: 2px dashed var(--phox-border);
	border-radius: var(--phox-radius);
	background: var(--phox-bg-soft);
	color: var(--phox-text-soft);
	cursor: pointer;
	text-align: center;
	transition: all var(--phox-transition);
}
.phox-upload__zone:hover, .phox-upload__zone.is-dragover {
	border-color: var(--phox-accent);
	color: var(--phox-accent);
	background: color-mix(in srgb, var(--phox-accent) 4%, var(--phox-bg));
}
.phox-upload__text { font-weight: 500; color: var(--phox-text); }
.phox-upload__hint { font-size: 12px; }
.phox-upload__input { display: none; }
.phox-upload__list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.phox-upload__item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 12px;
	border: 1px solid var(--phox-border);
	border-radius: var(--phox-radius-sm);
	background: var(--phox-bg);
	position: relative;
	overflow: hidden;
}
.phox-upload__preview {
	width: 36px; height: 36px;
	border-radius: 6px;
	object-fit: cover;
	flex: 0 0 36px;
}
.phox-upload__file-icon {
	display: flex; align-items: center; justify-content: center;
	width: 36px; height: 36px; flex: 0 0 36px;
	background: color-mix(in srgb, var(--phox-accent) 10%, transparent);
	color: var(--phox-accent);
	border-radius: 6px;
	font-size: 9px; font-weight: 700;
}
.phox-upload__name { flex: 1; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phox-upload__remove {
	border: none; background: transparent; cursor: pointer;
	color: var(--phox-text-soft); padding: 4px 8px; border-radius: 6px;
}
.phox-upload__remove:hover { color: var(--phox-error); }
.phox-upload__bar {
	position: absolute;
	left: 0; bottom: 0;
	height: 3px; width: 0;
	background: var(--phox-accent);
	transition: width .2s ease;
}

/* ---------- Grid layout ---------- */
.phox-group--grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 20px; }
.phox-group--grid .phox-group__title,
.phox-group--grid .phox-group__description { grid-column: 1 / -1; }
.phox-group--grid .phox-field--hidden { display: none; }

/* ---------- Accordion layout ---------- */
.phox-acc-item {
	border: 1px solid var(--phox-border);
	border-radius: var(--phox-radius-sm);
	margin-bottom: 8px;
	background: var(--phox-bg);
	overflow: hidden;
}
.phox-acc-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 12px 16px;
	border: none;
	background: transparent;
	font-weight: 600;
	font-size: 14px;
	color: var(--phox-text);
	cursor: pointer;
}
.phox-acc-header svg { transition: transform var(--phox-transition); color: var(--phox-text-soft); }
.phox-acc-item.is-open .phox-acc-header svg { transform: rotate(180deg); }
.phox-acc-body { display: none; padding: 4px 16px 16px; }
.phox-acc-item.is-open .phox-acc-body { display: block; }
.phox-acc-body .phox-field { margin-bottom: 0; }
.phox-acc-body .phox-field__label { display: none; } /* header already shows it */

/* ---------- Tabs layout ---------- */
.phox-layout-tabs {
	display: flex;
	gap: 4px;
	flex-wrap: wrap;
	border-bottom: 1px solid var(--phox-border);
	margin-bottom: 16px;
}
.phox-layout-tab {
	border: none;
	background: transparent;
	padding: 10px 14px;
	font-size: 14px;
	font-weight: 500;
	color: var(--phox-text-soft);
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
	cursor: pointer;
	transition: all var(--phox-transition);
}
.phox-layout-tab:hover { color: var(--phox-text); }
.phox-layout-tab.is-active { color: var(--phox-accent); border-bottom-color: var(--phox-accent); }
.phox-field--tab-hidden { display: none !important; }

/* ---------- Steps layout ---------- */
.phox-steps-nav {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 16px;
}
.phox-step-dot {
	width: 8px; height: 8px;
	border-radius: 50%;
	background: var(--phox-border);
	transition: all var(--phox-transition);
}
.phox-step-dot.is-current { background: var(--phox-accent); transform: scale(1.3); }
.phox-step-dot.is-done { background: color-mix(in srgb, var(--phox-accent) 50%, var(--phox-border)); }
.phox-step-label { margin-left: 8px; font-size: 13px; font-weight: 500; color: var(--phox-text-soft); }
.phox-field--step-hidden { display: none !important; }
.phox-steps-controls { display: flex; justify-content: space-between; margin-top: 16px; }
.phox-step-btn {
	padding: 9px 18px;
	border-radius: var(--phox-radius-sm);
	border: 1px solid var(--phox-border);
	background: var(--phox-bg);
	font-weight: 500;
	cursor: pointer;
	transition: all var(--phox-transition);
}
.phox-step-btn:hover:not(:disabled) { border-color: var(--phox-accent); color: var(--phox-accent); }
.phox-step-btn:disabled { opacity: .4; cursor: default; }
.phox-step-btn--next { background: var(--phox-accent); border-color: var(--phox-accent); color: #fff; }
.phox-step-btn--next:hover { background: color-mix(in srgb, var(--phox-accent) 85%, #000); color: #fff; }
.phox-steps-review {
	padding: 16px;
	border: 1px solid var(--phox-border);
	border-radius: var(--phox-radius);
	background: var(--phox-bg-soft);
}
.phox-steps-review__title { margin: 0 0 10px; font-size: 15px; }
.phox-steps-review__row {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 6px 0;
	border-bottom: 1px solid var(--phox-border);
	font-size: 14px;
}
.phox-steps-review__row:last-child { border-bottom: none; }
.phox-steps-review__row span { color: var(--phox-text-soft); }

/* ---------- Modal ---------- */
.phox-modal-trigger {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 11px 20px;
	border: 1px solid var(--phox-accent);
	border-radius: var(--phox-radius-sm);
	background: var(--phox-accent);
	color: #fff;
	font: inherit;
	font-weight: 600;
	font-size: 15px;
	cursor: pointer;
	transition: all var(--phox-transition);
}
.phox-modal-trigger:hover { background: color-mix(in srgb, var(--phox-accent) 88%, #000); }
.phox-modal-trigger.is-done {
	background: color-mix(in srgb, var(--phox-accent) 6%, var(--phox-bg));
	border-color: var(--phox-accent);
	color: var(--phox-text);
	font-weight: 500;
}
.phox-modal-trigger__check {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 18px;
	width: 18px; height: 18px;
	border-radius: 50%;
	background: var(--phox-accent);
	color: #fff;
}
.phox-modal-trigger__price { font-weight: 600; color: var(--phox-accent); }
.phox-modal-trigger__edit {
	margin-left: 4px;
	font-size: 13px;
	font-weight: 600;
	color: var(--phox-accent);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.phox-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(15, 23, 42, .6);
	padding: 20px;
}
.phox-modal.is-open { display: flex; }
.phox-modal__panel {
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 560px;
	max-height: 88vh;
	background: var(--phox-bg);
	border-radius: var(--phox-radius);
	box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .4);
	overflow: hidden;
}
.phox-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 16px 20px;
	border-bottom: 1px solid var(--phox-border);
}
.phox-modal__title { font-size: 17px; font-weight: 600; }
.phox-modal__close {
	flex: 0 0 30px;
	width: 30px; height: 30px;
	border: none;
	border-radius: 50%;
	background: var(--phox-bg-soft);
	color: var(--phox-text-soft);
	font-size: 13px;
	cursor: pointer;
	transition: all var(--phox-transition);
}
.phox-modal__close:hover { background: var(--phox-border); color: var(--phox-text); }
.phox-modal__body { padding: 20px; overflow-y: auto; flex: 1; }
.phox-modal__body .phox-group { margin-bottom: 0; }
.phox-modal__footer {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 14px 20px;
	border-top: 1px solid var(--phox-border);
	background: var(--phox-bg-soft);
}
.phox-modal__total { font-size: 16px; font-weight: 700; color: var(--phox-text); }
.phox-modal__confirm {
	margin-left: auto;
	padding: 11px 22px;
	border: none;
	border-radius: var(--phox-radius-sm);
	background: var(--phox-accent);
	color: #fff;
	font: inherit;
	font-weight: 600;
	font-size: 15px;
	cursor: pointer;
	transition: background var(--phox-transition);
}
.phox-modal__confirm:hover { background: color-mix(in srgb, var(--phox-accent) 85%, #000); }
body.phox-modal-lock { overflow: hidden; }

/* ---------- Mobile ---------- */
@media (max-width: 600px) {
	.phox-cards { grid-template-columns: repeat(2, 1fr); }
	.phox-input, .phox-image-dropdown__trigger { min-height: 48px; }
	.phox-check, .phox-option { padding: 12px 14px; }
	.phox-swatch__face { width: 48px; height: 48px; }
}

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

/* ---------- Bundled items (cart / checkout review / mini-cart) ----------
   Child line items of a Product Options selection get .phox-bundled-item via
   woocommerce_cart_item_class / woocommerce_mini_cart_item_class. These rules
   are cosmetic and fail soft: themes that strip row classes (or the blocks
   cart, which renders client-side) still show the "Included with" item meta.
   Literal colours — the .phox-addons custom properties are out of scope here. */

/* Classic cart + checkout review tables. */
tr.phox-bundled-item td.product-name {
	position: relative;
	padding-left: 2.5em;
}
tr.phox-bundled-item td.product-name::before {
	content: "\21B3"; /* ↳ */
	position: absolute;
	left: 1em;
	color: #6b7280;
}
tr.phox-bundled-item td.product-name,
tr.phox-bundled-item td.product-name a {
	font-size: .92em;
	color: #6b7280;
}
tr.phox-bundled-item td.product-thumbnail img {
	max-width: 40px;
	opacity: .9;
}

/* Mini-cart widget. */
li.phox-bundled-item {
	padding-left: 1.5em !important;
	font-size: .92em;
}
li.phox-bundled-item img {
	max-width: 36px;
}

/* Locked child quantity (rendered instead of the qty input). */
.phox-bundle-qty {
	display: inline-block;
	min-width: 2em;
	text-align: center;
	color: #6b7280;
}
