.bwb-configurator {
    --bwb-accent: var(--theme-palette-color-5, #304e3e);
    --bwb-border: #d5dfd8;
    --bwb-soft: #f2f7f3;
    margin: 1.5rem 0;
    width: 100%;
    color: inherit;
}
.bwb-configurator *, .bwb-configurator *::before, .bwb-configurator *::after { box-sizing: border-box; }
.bwb-configurator .bwb-intro { margin: 0 0 1rem; font-size: .9rem; line-height: 1.5; }
.bwb-search-label { display: block; margin-bottom: .3rem; font-size: .85rem; font-weight: 600; }
.bwb-configurator input.bwb-search { width: 100%; margin: 0 0 .8rem; border: 1px solid var(--bwb-border); border-radius: 8px; }
.bwb-list { border-top: 1px solid var(--bwb-border); }
.bwb-configurator:not(.is-enhanced) .bwb-step { display: none; }
.bwb-configurator:not(.is-enhanced) .bwb-total { display: none; }
.bwb-configurator .bwb-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 6px; border-bottom: 1px solid var(--bwb-border); }
.bwb-configurator .bwb-row[hidden] { display: none; }
.bwb-row.is-selected { background: var(--bwb-soft); }
.bwb-configurator .bwb-image { position: relative; display: block; width: 56px; height: 56px; border-radius: 6px; }
.bwb-configurator .bwb-image > img { display: block; width: 56px; height: 56px; object-fit: contain; border-radius: 6px; background: white; }
.bwb-configurator a.bwb-image:focus-visible { outline: 2px solid var(--bwb-accent); outline-offset: 3px; }
.bwb-image-preview { position: absolute; left: calc(100% + 8px); top: 50%; z-index: 20; width: 240px; height: 240px; padding: 6px; border: 1px solid var(--bwb-border); border-radius: 8px; background: white; box-shadow: 0 6px 24px rgb(0 0 0 / .18); opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-50%); }
.bwb-image-preview img { display: block; width: 100%; height: 100%; object-fit: contain; }
.bwb-image-preview:not(.is-loaded) { display: none; }
.bwb-image:hover .bwb-image-preview, .bwb-image:focus-visible .bwb-image-preview { opacity: 1; visibility: visible; }
.bwb-unit del { opacity: .65; margin-right: .25em; }
.bwb-unit ins { background: none; text-decoration: none; font-weight: 600; }
.bwb-info { min-width: 0; }
.bwb-info label { display: block; margin: 0 0 3px; font-weight: 600; font-size: .92rem; line-height: 1.3; cursor: pointer; overflow-wrap: anywhere; }
.bwb-unit { display: block; font-size: .83rem; line-height: 1.4; }
.bwb-unit > span:last-child { opacity: .75; }
.bwb-configurator .bwb-quantity { display: flex; align-items: center; gap: 2px; }
.bwb-configurator button.bwb-step { display: inline-flex; justify-content: center; align-items: center; min-height: 36px; min-width: 32px; width: 32px; height: 36px; padding: 0; border: 1px solid var(--bwb-border); border-radius: 6px; background: white; color: var(--bwb-accent); font: inherit; line-height: 1; cursor: pointer; }
.bwb-configurator button.bwb-step:disabled { opacity: .4; cursor: default; }
.bwb-configurator input.bwb-qty { width: 44px; min-width: 44px; height: 36px; min-height: 36px; padding: 2px; border: 1px solid var(--bwb-border); border-radius: 6px; background: white; text-align: center; font-size: .9rem; -moz-appearance: textfield; appearance: textfield; }
.bwb-qty::-webkit-inner-spin-button, .bwb-qty::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.bwb-configurator .bwb-summary { margin-top: 16px; padding: 16px; border: 1px solid var(--bwb-border); border-radius: 12px; background: var(--bwb-soft); }
.bwb-summary-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.bwb-count { display: block; font-size: .95rem; }
.bwb-weight { display: block; margin-top: 3px; font-size: .8rem; opacity: .8; }
.bwb-total { white-space: nowrap; font-size: 1.2rem; }
.bwb-configurator .bwb-status { margin: 10px 0 14px; font-size: .85rem; line-height: 1.4; }
.bwb-submit-row { display: flex; align-items: flex-end; gap: 14px; }
.bwb-boxes-label { flex: 0 0 110px; font-size: .76rem; line-height: 1.4; }
.bwb-configurator input.bwb-box-quantity { display: block; width: 70px; height: 40px; min-height: 40px; margin-top: 4px; padding: 4px 8px; background: white; border: 1px solid var(--bwb-border); border-radius: 6px; }
.bwb-configurator button.bwb-submit { flex: 1; min-height: 44px; padding: 10px 14px; border: 0; border-radius: 8px; background: var(--bwb-accent); color: white; font-size: .9rem; line-height: 1.4; cursor: pointer; }
.bwb-configurator button.bwb-submit:disabled { opacity: .45; cursor: not-allowed; }
.bwb-summary small { display: block; margin-top: 10px; font-size: .72rem; line-height: 1.4; opacity: .8; }
.bwb-configurator :is(button, input):focus-visible { outline: 2px solid var(--bwb-accent); outline-offset: 3px; }
@media (max-width: 400px) {
    .bwb-configurator .bwb-row { grid-template-columns: 44px minmax(0, 1fr); gap: 8px 12px; }
    .bwb-configurator .bwb-image, .bwb-configurator .bwb-image > img { width: 44px; height: 44px; }
    .bwb-image-preview { width: min(220px, calc(100vw - 95px)); height: 220px; }
    .bwb-quantity { grid-column: 2; justify-self: start; }
    .bwb-summary-top, .bwb-submit-row { flex-wrap: wrap; }
    .bwb-configurator button.bwb-submit { flex-basis: 100%; }
}

.bwb-configurator .bwb-packing { margin: 0 0 1rem; padding: 14px; border: 1px solid var(--bwb-border); border-radius: 8px; }
.bwb-packing legend { padding: 0 5px; font-weight: 600; }
.bwb-packing label { display: block; cursor: pointer; font-weight: 600; }
.bwb-packing p { margin: 4px 0 14px; font-size: .85rem; }
.bwb-packing p:last-child { margin-bottom: 0; }
.bwb-packing input { accent-color: var(--bwb-accent); }
.bwb-packaging-policy, .bwb-pack-count, .bwb-fee { font-size: .85rem; line-height: 1.5; }
.bwb-configurator .bwb-continue, .bwb-configurator .bwb-preview { display: block; width: 100%; margin-top: 12px; padding: 10px; min-height: 44px; border: 1px solid var(--bwb-accent); border-radius: 8px; background: white; color: var(--bwb-accent); white-space: normal; cursor: pointer; }
.bwb-configurator .bwb-continue:disabled { opacity: .45; cursor: not-allowed; }
.bwb-configurator [hidden], .bwb-configurator.is-enhanced .bwb-preview { display: none !important; }
.bwb-configurator:not(.is-enhanced) .bwb-total { display: block; }
