.ws-configurator {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 12px 0 18px;
    padding: 16px;
    background: #faf8f4;
    border: 1px solid #e5e0d6;
    border-radius: 10px;
}

.ws-configurator__row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ws-configurator__label {
    font-weight: 600;
    font-size: 13px;
    color: #3E2723;
    letter-spacing: 0.01em;
}

.ws-configurator__select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d4cdbf;
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
}

.ws-configurator__wood-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ws-configurator__wood {
    flex: 1 1 auto;
    min-width: 90px;
    padding: 8px 12px;
    border: 1px solid #d4cdbf;
    border-radius: 6px;
    background: #fff;
    text-align: center;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.ws-configurator__wood input {
    margin: 0;
}

.ws-configurator__swatch {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid #d4cdbf;
    display: block;
    flex-shrink: 0;
}

.ws-configurator__wood.has-swatch {
    padding: 6px 10px;
    gap: 8px;
}

.ws-configurator__window-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ws-configurator__window {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid #d4cdbf;
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
}

.ws-configurator__window-main {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 auto;
    cursor: pointer;
    margin: 0;
    min-width: 0;
}

.ws-configurator__window input {
    margin: 0;
}

.ws-configurator__window-label {
    flex: 1 1 auto;
    min-width: 0;
}

.ws-configurator__window-surcharge {
    display: block;
    font-size: 12px;
    color: #6b5b49;
    font-weight: 400;
}

/* Inline qty stepper on the Glass pill */
.ws-configurator__qty {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    padding: 2px;
    flex-shrink: 0;
}

.ws-configurator__qty[hidden] {
    display: none;
}

.ws-configurator__qty-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid #d4cdbf;
    background: #faf8f4;
    color: #3E2723;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 120ms ease, opacity 120ms ease;
}

.ws-configurator__qty-btn:hover:not(:disabled) {
    background: #efe9dc;
}

.ws-configurator__qty-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.ws-configurator__qty-value {
    min-width: 18px;
    text-align: center;
    font-weight: 700;
    color: #3E2723;
}

/* Yes/No pill pair (Free Installation etc.) */
.ws-configurator__yesno {
    display: flex;
    gap: 8px;
}

.ws-configurator__yesno-opt {
    flex: 1 1 auto;
    min-width: 80px;
    padding: 10px 16px;
    border: 1px solid #d4cdbf;
    border-radius: 6px;
    background: #fff;
    text-align: center;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: border-color 120ms ease, background-color 120ms ease;
}

.ws-configurator__yesno-opt input {
    margin: 0;
}

/* Hide the native radio circle — the filled pill state conveys selection.
   Kept in the DOM so the form still submits and screen readers / keyboard users
   can still navigate to the input via its label. */
.ws-configurator__wood input[type="radio"],
.ws-configurator__window input[type="radio"],
.ws-configurator__yesno-opt input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 1px;
    height: 1px;
    margin: 0;
}

/* Selected-state: fully filled pill, shared across Wood, Windows and Yes/No.
   Pulls from the site's theme palette (Wooden Sheds → Settings → Theme → Muted),
   with #6b5b49 as a fallback if the CSS var isn't emitted for any reason. */
.ws-configurator__wood:has(input:checked),
.ws-configurator__window:has(input:checked),
.ws-configurator__yesno-opt:has(input:checked) {
    background: var(--ws-muted, #6b5b49);
    border-color: var(--ws-muted, #6b5b49);
    color: #fff;
}

/* Keep small-text readable on the darker selected background */
.ws-configurator__window:has(input:checked) .ws-configurator__window-surcharge {
    color: rgba(255, 255, 255, 0.8);
}


.ws-configurator__windows {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
}

.ws-configurator__price {
    margin-top: 4px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #e5e0d6;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ws-configurator__price-top {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
}

.ws-configurator__delivery {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid #f0ebe1;
    font-size: 13px;
    color: #6b5b49;
}

.ws-configurator__delivery svg {
    flex-shrink: 0;
    color: #8a7b68;
}

.ws-configurator__delivery strong {
    color: #3E2723;
    font-weight: 700;
}

.ws-configurator__price-prefix {
    font-size: 13px;
    color: #6b5b49;
}

.ws-configurator__price-value {
    font-size: 22px;
    font-weight: 700;
    color: #3E2723;
}

.ws-configurator__free-shipping {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #2e6b2e;
    white-space: nowrap;
}

.ws-configurator__free-shipping strong {
    font-weight: 700;
}

.ws-configurator__free-shipping svg {
    flex-shrink: 0;
}

.ws-configurator__price-msg {
    font-size: 13px;
    color: #a94442;
    flex-basis: 100%;
}
