.ubc-builder { --ubc-accent: #176b4d; --ubc-border: #d9dedb; margin: 1.25rem 0; padding: 1rem; border: 1px solid var(--ubc-border); border-radius: 12px; background: #fff; }
.ubc-builder__header { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; margin-bottom: .9rem; }
.ubc-builder__header h2 { margin: 0 0 .25rem; font-size: 1.25rem; line-height: 1.25; }
.ubc-builder__header p { margin: 0; color: #5f6662; font-size: .9rem; }
.ubc-builder__counter { flex: 0 0 auto; padding: .25rem .6rem; border-radius: 999px; background: #eef5f1; color: var(--ubc-accent); font-size: .8rem; font-weight: 700; }
.ubc-products { display: grid; gap: .65rem; }
.ubc-product { position: relative; display: grid; grid-template-columns: 72px 1fr; gap: .8rem; padding: .75rem; border: 1px solid var(--ubc-border); border-radius: 10px; transition: border-color .15s, box-shadow .15s; }
.ubc-product.is-selected { border-color: var(--ubc-accent); box-shadow: 0 0 0 1px var(--ubc-accent); }
.ubc-product.is-required { border-color: #d85b2a; background: linear-gradient(135deg, #fffaf7 0%, #fff 62%); box-shadow: 0 0 0 1px rgba(216, 91, 42, .32); }
.ubc-product.is-required::before { content: ''; position: absolute; top: 10px; bottom: 10px; left: -2px; width: 4px; border-radius: 999px; background: #d85b2a; }
.ubc-product.is-loading { opacity: .72; }
.ubc-product:not(.is-required) { cursor: pointer; }
.ubc-product__select { position: absolute; top: .2rem; right: .2rem; display: grid; width: 42px; height: 42px; place-items: center; cursor: pointer; }
.ubc-product__select input[type="checkbox"] { position: absolute; opacity: 0; pointer-events: none; }
.ubc-product__select span { display: block; width: 22px; height: 22px; border: 2px solid #9aa39e; border-radius: 6px; background: #fff; }
.ubc-product__select input:checked + span { border-color: var(--ubc-accent); background: var(--ubc-accent); }
.ubc-product__select input:checked + span::after { content: ''; display: block; width: 5px; height: 10px; margin: 2px 0 0 7px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.ubc-product__image img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; }
.ubc-product__content { min-width: 0; padding-right: 28px; }
.ubc-product.is-required .ubc-product__content { padding-right: 0; }
.ubc-product__content h3 { margin: .25rem 0; font-size: 1rem; line-height: 1.3; }
.ubc-product__badges { min-height: 1.25rem; }
.ubc-badge { display: inline-block; padding: .12rem .45rem; border-radius: 999px; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.ubc-badge--required { background: #fff0ec; color: #a33219; }
.ubc-badge--optional { background: #eef2f0; color: #56605b; }
.ubc-product__required-note { display: flex; gap: .5rem; align-items: flex-start; margin: .5rem 0; padding: .55rem .65rem; border-radius: 8px; background: #fff0e9; color: #812f17; font-size: .78rem; font-weight: 650; line-height: 1.35; }
.ubc-lock { position: relative; flex: 0 0 auto; width: 13px; height: 11px; margin-top: 5px; border: 2px solid currentColor; border-radius: 2px; }
.ubc-lock::before { content: ''; position: absolute; left: 1px; bottom: 7px; width: 7px; height: 7px; border: 2px solid currentColor; border-bottom: 0; border-radius: 7px 7px 0 0; }
.ubc-product__rating .star-rating { float: none; margin: .15rem 0; font-size: .8rem; }
.ubc-product__price { color: #202522; font-weight: 700; }
.ubc-product__bundle-price { margin-top: .15rem; color: var(--ubc-accent); font-size: .86rem; font-weight: 700; }
.ubc-product__options { grid-column: 1 / -1; display: grid; gap: .5rem; margin-top: .65rem; padding-top: .65rem; border-top: 1px solid #edf0ee; }
.ubc-product__options[hidden] { display: none; }
.ubc-product__attribute > span { display: block; margin-bottom: .3rem; font-size: .8rem; font-weight: 600; }
.ubc-product__options select { width: 100%; min-height: 38px; margin: 0; }
.ubc-product__options .ubc-swatch-source { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.ubc-swatches { display: flex; flex-wrap: wrap; gap: .55rem; }
.ubc-swatch { position: relative; display: grid; width: 42px; height: 42px; min-width: 42px; padding: 3px; place-items: center; border: 2px solid transparent; border-radius: 50%; background: #fff; cursor: pointer; box-shadow: 0 0 0 1px #cfd5d1; transition: border-color .15s, box-shadow .15s, transform .15s; }
.ubc-swatch > span { display: block; width: 100%; height: 100%; border-radius: 50%; background: var(--ubc-swatch-color); }
.ubc-swatch img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.ubc-swatch:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 0 0 2px #adb8b2; }
.ubc-swatch:focus-visible { outline: 3px solid rgba(23, 107, 77, .25); outline-offset: 2px; }
.ubc-swatch.is-active { border-color: var(--ubc-accent); box-shadow: 0 0 0 1px var(--ubc-accent); }
.ubc-swatch:disabled { cursor: not-allowed; opacity: .45; }
.ubc-product__variation-message { margin: 0; color: #b42318; font-size: .82rem; }
.ubc-summary { margin-top: .8rem; padding: .85rem; border-radius: 10px; background: #f6f8f7; }
.ubc-builder .ubc-summary__progress { position: relative; box-sizing: border-box; min-height: 48px; margin: 0 0 .75rem; padding: .75rem .85rem .75rem 3.5rem; border: 1px solid #9bcdb8; border-left: 5px solid var(--ubc-accent); border-radius: 9px; background: #eaf7f1; color: #0b5e3f; font-size: 1rem; font-weight: 800; line-height: 1.4; box-shadow: 0 3px 10px rgba(23, 107, 77, .08); }
.ubc-builder .ubc-summary__progress::before { content: '%'; position: absolute; top: 50%; left: .85rem; display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: var(--ubc-accent); color: #fff; font-size: .9rem; font-weight: 900; transform: translateY(-50%); }
.ubc-builder .ubc-summary__progress:empty { display: none; }
.ubc-summary__row { display: flex; justify-content: space-between; gap: 1rem; }
.ubc-summary__row strong { font-size: 1.05rem; }
.ubc-summary__savings { margin-top: .2rem; color: var(--ubc-accent); }
.ubc-summary__validation { margin: .5rem 0 0; color: #b42318; font-size: .85rem; }
.ubc-summary__validation:empty { display: none; }
.ubc-cart-child .wc-block-components-quantity-selector { display: none !important; }

@media (min-width: 680px) {
	.ubc-products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 420px) {
	.ubc-builder { padding: .75rem; }
	.ubc-builder__header { display: block; }
	.ubc-builder__counter { display: inline-block; margin-top: .55rem; }
	.ubc-product { grid-template-columns: 60px 1fr; }
	.ubc-product__image img { width: 60px; height: 60px; }
}

@media (prefers-reduced-motion: reduce) {
	.ubc-product, .ubc-swatch { transition: none; }
}
