/* Workbench calculator — matches catalog / STEELPRO UI */

.wb-calc-section {
    --wb-brand: #1185D8;
    --wb-brand-deep: #0E74BE;
    --wb-ink: #151A22;
    --wb-muted: #6B7280;
    --wb-line: #E7EDF4;
    --wb-soft: #F8FAFC;
    --wb-white: #FFFFFF;
    --wb-warn: #B45309;
    --wb-radius: 20px;
    --wb-radius-sm: 14px;
    --wb-radius-xs: 12px;
    --wb-shadow: 0 15px 40px rgba(0, 0, 0, 0.05);
    --wb-shadow-hover: 0 22px 50px rgba(17, 133, 216, 0.12);
    margin: 8px 0 36px;
    font-family: Play, sans-serif;
    color: var(--wb-ink);
    /* Keep section clear of sticky category subnav when opening #workbench-calculator */
    scroll-margin-top: calc(var(--ph-subnav, 52px) + 16px);
}

.wb-calc-section * {
    box-sizing: border-box;
}

.wb-calc-section__head {
    margin-bottom: 18px;
}

.wb-calc-section__title {
    margin: 0 0 8px;
    font-size: clamp(22px, 2.4vw, 28px);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--wb-ink);
}

.wb-calc-section__lead {
    margin: 0;
    max-width: 62ch;
    color: var(--wb-muted);
    font-size: 15px;
    line-height: 1.45;
}

.wb-calc {
    border: 1px solid var(--wb-line);
    border-radius: var(--wb-radius);
    background: var(--wb-white);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.8) inset,
        var(--wb-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Left: preview · Center: options · Right: configuration */
.wb-calc__grid {
    display: grid;
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr) minmax(220px, 280px);
    gap: 0;
    height: min(560px, 70vh);
    min-height: 420px;
    max-height: min(560px, 70vh);
    align-items: stretch;
    overflow: hidden;
    /* Keep explicit height — flex-grow:0 avoids collapse when parent has no height */
    flex: 0 0 auto;
}

.wb-calc__grid.is-step1 {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 420px;
    max-height: none;
    overflow: visible;
}

.wb-calc__grid.is-step1 .wb-calc__main {
    height: auto;
    max-height: none;
    overflow: visible;
}

.wb-calc__grid:not(.is-step1) .wb-calc__main {
    min-height: 360px;
}

.wb-loading,
.wb-invalid {
    margin: 0;
    padding: 28px 8px;
    color: var(--wb-muted);
    font-size: 15px;
    line-height: 1.45;
}

.wb-invalid {
    color: #b45309;
}

.wb-calc__preview-col,
.wb-calc__main,
.wb-calc__side {
    min-width: 0;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
}

.wb-calc__preview-col::-webkit-scrollbar,
.wb-calc__main::-webkit-scrollbar,
.wb-calc__side::-webkit-scrollbar,
.wb-acc-list::-webkit-scrollbar {
    width: 8px;
}

.wb-calc__preview-col::-webkit-scrollbar-thumb,
.wb-calc__main::-webkit-scrollbar-thumb,
.wb-calc__side::-webkit-scrollbar-thumb,
.wb-acc-list::-webkit-scrollbar-thumb {
    background: #C5D4E4;
    border-radius: 999px;
}

.wb-calc__preview-col {
    border-right: 1px solid var(--wb-line);
    background: linear-gradient(180deg, #FFFFFF 0%, var(--wb-soft) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.wb-calc__preview-col[hidden],
.wb-calc__preview-col.is-hidden,
.wb-calc__side[hidden],
.wb-calc__side.is-hidden {
    display: none !important;
}

.wb-preview-wrap {
    padding: 20px 12px 16px;
    width: 100%;
    flex: 0 0 auto;
}

.wb-preview-wrap .preview {
    margin: 0 auto;
    transform: scale(0.9);
    transform-origin: top center;
}

.wb-preview-wrap .preview-dot {
    background: var(--wb-brand);
    pointer-events: none;
}

.wb-calc__main {
    padding: 22px 24px 18px;
    border-right: 1px solid var(--wb-line);
}

.wb-calc__grid.is-step1 .wb-calc__main {
    border-right: none;
}

.wb-calc__side {
    padding: 18px 18px 20px;
    background: var(--wb-soft);
}

.wb-calc__footer {
    flex: 0 0 auto;
    position: relative;
    z-index: 5;
}

.wb-step__head {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 12px;
    margin-bottom: 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--wb-brand);
    background: rgba(17, 133, 216, 0.1);
    border-radius: 999px;
}

.wb-step__title {
    margin: 0 0 14px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--wb-ink);
}

.wb-step__sub {
    margin: 18px 0 10px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--wb-muted);
}

.wb-step__desc {
    margin: 0 0 16px;
    color: var(--wb-muted);
    font-size: 14px;
    line-height: 1.45;
}

.wb-series-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.wb-series {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    border: 1px solid var(--wb-line);
    border-radius: var(--wb-radius-sm);
    background: var(--wb-white);
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: inherit;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.wb-series img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    max-height: 120px;
    object-fit: cover;
    background: var(--wb-soft);
}

.wb-series__name {
    padding: 12px 14px 2px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: -0.01em;
}

.wb-series__load {
    padding: 0 14px 14px;
    font-size: 13px;
    color: var(--wb-muted);
    line-height: 1.35;
}

.wb-series:hover {
    border-color: #B7D7F2;
    transform: translateY(-2px);
    box-shadow: var(--wb-shadow-hover);
}

.wb-series.is-active {
    border-color: var(--wb-brand);
    box-shadow:
        0 0 0 1px var(--wb-brand),
        var(--wb-shadow-hover);
}

.wb-radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wb-radio {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--wb-line);
    border-radius: var(--wb-radius-xs);
    background: var(--wb-white);
    cursor: pointer;
    font-size: 14px;
    line-height: 1.35;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.wb-radio input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.wb-radio__mark {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    border: 2px solid #C5CED8;
    border-radius: 50%;
    position: relative;
    background: #fff;
}

.wb-radio:hover:not(.is-disabled) {
    border-color: #B7D7F2;
}

.wb-radio.is-active {
    border-color: var(--wb-brand);
    background: rgba(17, 133, 216, 0.06);
    box-shadow: 0 0 0 1px rgba(17, 133, 216, 0.15);
}

.wb-radio.is-active .wb-radio__mark {
    border-color: var(--wb-brand);
}

.wb-radio.is-active .wb-radio__mark::after {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: var(--wb-brand);
}

.wb-radio.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.wb-stand-row {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 16px;
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--wb-line);
}

.wb-stand-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.wb-stand {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    border: 1px solid var(--wb-line);
    border-radius: var(--wb-radius-xs);
    background: var(--wb-white);
    cursor: pointer;
    font-size: 13px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.wb-stand input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.wb-stand:hover {
    border-color: #B7D7F2;
    transform: translateY(-1px);
}

.wb-stand.is-active {
    border-color: var(--wb-brand);
    box-shadow: 0 0 0 1px var(--wb-brand);
    background: rgba(17, 133, 216, 0.04);
}

.wb-stand__title {
    font-weight: 700;
    line-height: 1.3;
}

.wb-stand__img {
    width: 100%;
    height: 90px;
    object-fit: contain;
    background: var(--wb-soft);
    border-radius: 10px;
}

.wb-stand__price {
    color: var(--wb-brand);
    font-weight: 700;
}

.wb-invalid {
    margin-top: 12px;
    padding: 12px 14px;
    background: #FFF7ED;
    border: 1px solid #FDBA74;
    border-radius: var(--wb-radius-xs);
    color: var(--wb-warn);
    font-size: 14px;
    line-height: 1.4;
}

.wb-summary__label {
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 10px;
    margin-bottom: 14px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--wb-brand);
    background: rgba(17, 133, 216, 0.1);
    border-radius: 999px;
}

.wb-summary__empty {
    margin: 0;
    color: var(--wb-muted);
    font-size: 14px;
}

.wb-summary__list {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 14px;
    line-height: 1.45;
}

.wb-summary__list li {
    margin: 0 0 12px;
}

.wb-summary__list b {
    display: block;
    color: var(--wb-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 3px;
}

.wb-summary__price {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--wb-line);
    font-size: 14px;
    display: grid;
    gap: 6px;
}

.wb-summary__price strong {
    color: var(--wb-brand);
    font-size: 20px;
    letter-spacing: -0.02em;
}

.wb-calc__footer {
    display: grid;
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr) minmax(220px, 280px);
    align-items: center;
    gap: 0;
    padding: 0;
    border-top: 1px solid var(--wb-line);
    background: var(--wb-soft);
    flex-shrink: 0;
    position: relative;
    z-index: 5;
}

.wb-calc.is-step1 .wb-calc__footer,
.wb-calc__grid.is-step1 ~ .wb-calc__footer {
    grid-template-columns: 1fr auto;
}

.wb-calc__grid.is-step1 ~ .wb-calc__footer .wb-calc__footer-spacer {
    display: none;
}

.wb-calc__footer-qty {
    padding: 14px 18px;
    border-right: 1px solid var(--wb-line);
    min-width: 0;
}

.wb-calc__grid.is-step1 ~ .wb-calc__footer .wb-calc__footer-qty {
    border-right: none;
}

.wb-calc__footer-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 18px;
    min-width: 0;
}

.wb-calc__footer-spacer {
    min-height: 1px;
    border-left: 1px solid var(--wb-line);
    background: var(--wb-soft);
    align-self: stretch;
}

.wb-qty {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--wb-ink);
}

.wb-qty input {
    width: 64px;
    padding: 10px 12px;
    border: 1px solid var(--wb-line);
    border-radius: var(--wb-radius-xs);
    text-align: center;
    font: inherit;
    background: var(--wb-white);
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wb-qty input:focus {
    border-color: var(--wb-brand);
    box-shadow: 0 0 0 3px rgba(17, 133, 216, 0.15);
}

.wb-btn {
    appearance: none;
    border: none;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 16px;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.01em;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(180deg, #1A91E0 0%, var(--wb-brand) 100%);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.22) inset,
        0 10px 24px rgba(17, 133, 216, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, opacity 0.15s ease;
}

.wb-btn:hover:not(:disabled) {
    background: linear-gradient(180deg, #2A9BE6 0%, var(--wb-brand-deep) 100%);
    transform: translateY(-1px);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.25) inset,
        0 14px 28px rgba(17, 133, 216, 0.36);
}

.wb-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.wb-btn--ghost {
    background: var(--wb-white);
    color: var(--wb-ink);
    border: 1px solid var(--wb-line);
    box-shadow: none;
}

.wb-btn--ghost:hover:not(:disabled) {
    background: #F1F6FB;
    border-color: #C9D7E6;
    box-shadow: none;
    transform: none;
}

.wb-btn--accent {
    background: linear-gradient(180deg, #1A91E0 0%, var(--wb-brand) 100%);
}

.wb-result {
    padding: 24px 28px 28px;
    border-top: 1px solid var(--wb-line);
    background: var(--wb-white);
}

.wb-result__title {
    margin: 0 0 16px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--wb-ink);
}

.wb-bom {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
    gap: 20px;
    align-items: start;
}

.wb-bom-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--wb-line);
    border-radius: var(--wb-radius-sm);
    background: var(--wb-white);
}

.wb-bom-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.wb-bom-table th,
.wb-bom-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--wb-line);
    text-align: left;
}

.wb-bom-table th {
    background: var(--wb-soft);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--wb-muted);
}

.wb-bom-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: var(--wb-soft);
    font-weight: 700;
}

.wb-bom-summary-price,
.wb-bom-price {
    color: var(--wb-brand);
}

.wb-bom-side {
    padding: 20px;
    background: var(--wb-soft);
    border: 1px solid var(--wb-line);
    border-radius: var(--wb-radius-sm);
}

.wb-bom-price-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--wb-muted);
    font-weight: 700;
}

.wb-bom-price {
    margin: 6px 0 18px;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.wb-lead-form {
    display: grid;
    gap: 12px;
}

.wb-lead-field {
    display: grid;
    gap: 6px;
}

.wb-lead-field label {
    font-size: 13px;
    font-weight: 700;
}

.wb-lead-field input {
    padding: 12px 14px;
    border: 1px solid var(--wb-line);
    border-radius: var(--wb-radius-sm);
    font: inherit;
    background: var(--wb-white);
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wb-lead-field input:focus {
    border-color: var(--wb-brand);
    box-shadow: 0 0 0 3px rgba(17, 133, 216, 0.15);
}

.wb-lead-consent {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    font-size: 12px;
    color: var(--wb-muted);
    line-height: 1.35;
}

.wb-lead-consent input {
    margin-top: 2px;
    accent-color: var(--wb-brand);
}

.wb-lead-consent a {
    color: var(--wb-brand);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.wb-lead-submit {
    appearance: none;
    border: none;
    min-height: 52px;
    padding: 0 18px;
    border-radius: 16px;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(180deg, #1A91E0 0%, var(--wb-brand) 100%);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.22) inset,
        0 12px 28px rgba(17, 133, 216, 0.3);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.wb-lead-submit:hover {
    background: linear-gradient(180deg, #2A9BE6 0%, var(--wb-brand-deep) 100%);
    transform: translateY(-1px);
}

.wb-lead-message {
    font-size: 13px;
    padding: 10px 12px;
    border-radius: var(--wb-radius-xs);
}

.wb-lead-message.is-success {
    color: #047857;
    background: #ECFDF5;
}

.wb-lead-message.is-error {
    color: #B91C1C;
    background: #FEF2F2;
}

.wb-acc-list {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    /* Scroll the whole center column instead of a nested list */
    max-height: none;
    overflow: visible;
    padding: 2px 2px 8px;
}

.wb-acc {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--wb-line);
    border-radius: var(--wb-radius-xs);
    background: var(--wb-white);
    cursor: pointer;
    min-width: 0;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.wb-acc:hover {
    border-color: #B7D7F2;
    transform: translateY(-1px);
}

.wb-acc.is-active {
    border-color: var(--wb-brand);
    background: rgba(17, 133, 216, 0.04);
    box-shadow: 0 0 0 1px var(--wb-brand);
}

.wb-acc > input[type="checkbox"] {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--wb-brand);
}

.wb-acc img {
    display: block;
    width: 100%;
    height: 88px;
    object-fit: contain;
    background: var(--wb-soft);
    border-radius: 10px;
    margin-top: 10px;
}

.wb-acc__meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1;
}

.wb-acc__title {
    font-weight: 700;
    font-size: 12px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wb-acc__size,
.wb-acc__price {
    font-size: 11px;
    color: var(--wb-muted);
    line-height: 1.3;
}

.wb-acc__price {
    color: var(--wb-brand);
    font-weight: 700;
    font-size: 13px;
    margin-top: auto;
}

.wb-acc__qty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: auto;
    min-height: 28px;
}

.wb-acc__qty.is-idle {
    visibility: hidden;
    pointer-events: none;
}

.wb-acc__qty button {
    width: 28px;
    height: 28px;
    border: 1px solid var(--wb-line);
    border-radius: 10px;
    background: var(--wb-white);
    cursor: pointer;
    font: inherit;
    flex: 0 0 auto;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.wb-acc__qty button:hover {
    border-color: #B7D7F2;
    background: var(--wb-soft);
}

.wb-acc__qty input {
    width: 36px;
    text-align: center;
    border: 1px solid var(--wb-line);
    border-radius: 10px;
    padding: 5px;
    font: inherit;
}

@media (max-width: 1100px) {
    .wb-calc__grid:not(.is-step1) {
        grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
        grid-template-rows: minmax(0, 1fr) auto;
        height: min(580px, 68vh);
        max-height: min(580px, 68vh);
    }

    .wb-calc__grid:not(.is-step1) ~ .wb-calc__footer {
        grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
    }

    .wb-calc__grid:not(.is-step1) ~ .wb-calc__footer .wb-calc__footer-spacer {
        display: none;
    }

    .wb-calc__grid:not(.is-step1) .wb-calc__preview-col,
    .wb-calc__grid:not(.is-step1) .wb-calc__main {
        height: auto;
        max-height: 100%;
        min-height: 0;
    }

    .wb-calc__side {
        grid-column: 1 / -1;
        border-top: 1px solid var(--wb-line);
        height: auto;
        max-height: min(200px, 28vh);
        overflow-x: hidden;
        overflow-y: auto;
    }

    .wb-calc__main {
        border-right: none;
    }

    .wb-acc-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .wb-series-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Phone / narrow tablet: full vertical stack, no fixed-height clip */
@media (max-width: 760px) {
    .wb-calc-section {
        max-width: 100%;
        overflow-x: clip;
        /* Let vertical finger pans scroll the page, not nested calc scrollports */
        touch-action: pan-y;
    }

    .wb-calc {
        border-radius: 18px;
        /* visible: avoid creating a scrollport that traps body scroll on iOS */
        overflow: visible;
        max-width: 100%;
        touch-action: pan-y;
    }

    .wb-calc__grid:not(.is-step1),
    .wb-bom,
    .wb-stand-row {
        grid-template-columns: 1fr;
    }

    .wb-calc__grid:not(.is-step1) {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        height: auto;
        min-height: 0;
        max-height: none;
        overflow: visible;
    }

    .wb-calc__grid:not(.is-step1) ~ .wb-calc__footer {
        display: flex;
        flex-direction: column;
        grid-template-columns: none;
    }

    .wb-calc__footer-qty {
        border-right: none;
        border-bottom: 1px solid var(--wb-line);
        width: 100%;
    }

    .wb-calc__footer-actions {
        justify-content: stretch;
        width: 100%;
        gap: 10px;
    }

    .wb-calc__footer-actions .wb-btn {
        flex: 1 1 auto;
        min-width: 0;
        min-height: 48px;
    }

    .wb-calc__footer-spacer {
        display: none;
    }

    /*
     * Critical: overflow-x:hidden + overflow-y:visible computes to overflow-y:auto
     * (CSS overflow pairing). That nested scrollport + overscroll-behavior:contain
     * swallows vertical touchmoves so the page cannot scroll on the calculator.
     */
    .wb-calc__preview-col,
    .wb-calc__main,
    .wb-calc__side {
        position: relative;
        z-index: auto;
        width: 100%;
        height: auto;
        max-height: none;
        min-height: 0;
        overflow: visible;
        overscroll-behavior: auto;
        -webkit-overflow-scrolling: auto;
        touch-action: pan-y;
        flex: 0 0 auto;
    }

    /* Beat tablet (1100px) specificity: .wb-calc__grid:not(.is-step1) .wb-calc__* */
    .wb-calc__grid:not(.is-step1) .wb-calc__preview-col,
    .wb-calc__grid:not(.is-step1) .wb-calc__main,
    .wb-calc__grid:not(.is-step1) .wb-calc__side {
        height: auto;
        max-height: none;
        min-height: 0;
        overflow: visible;
        overscroll-behavior: auto;
        touch-action: pan-y;
    }

    .wb-calc__preview-col,
    .wb-calc__grid:not(.is-step1) .wb-calc__preview-col {
        border-right: none;
        border-bottom: 1px solid var(--wb-line);
        /* Cap height without a scrollport — scaled preview fits inside wrap */
        max-height: min(240px, 36vh);
        overflow: visible;
        overscroll-behavior: auto;
        -webkit-overflow-scrolling: auto;
        touch-action: pan-y;
    }

    .wb-calc__main,
    .wb-calc__grid:not(.is-step1) .wb-calc__main {
        padding: 18px 16px 16px;
        min-height: 0;
        border-right: none;
    }

    .wb-calc__side,
    .wb-calc__grid:not(.is-step1) .wb-calc__side {
        border-top: 1px solid var(--wb-line);
        max-height: none;
        padding: 16px;
    }

    .wb-preview-wrap {
        padding: 10px 8px 8px;
        /* clip paints overflow without enabling touch scrolling / scroll chaining */
        overflow: clip;
        display: flex;
        justify-content: center;
        align-items: flex-start;
        height: min(220px, 34vh);
        max-height: min(220px, 34vh);
        touch-action: pan-y;
        overscroll-behavior: auto;
    }

    .wb-preview-wrap .preview {
        transform: scale(0.72);
        transform-origin: top center;
        width: 100%;
        max-width: 320px;
    }

    .wb-preview-wrap .preview-container {
        width: min(320px, 100%) !important;
        max-width: 100%;
    }

    /* Keep page chrome from covering calculator controls while it is on screen */
    body.wb-calc-in-view .cat-mobile-fabs {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

    .wb-stand-row {
        gap: 12px;
        margin-bottom: 14px;
        padding-bottom: 14px;
    }

    .wb-stand-group {
        grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    }

    .wb-radio {
        min-height: 44px;
        padding: 14px;
    }

    .wb-stand {
        min-height: 44px;
    }

    .wb-qty {
        flex-wrap: wrap;
        width: 100%;
    }

    .wb-qty input {
        min-height: 44px;
        width: 72px;
        font-size: 16px; /* avoid iOS zoom */
    }

    .wb-acc-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .wb-acc {
        min-height: 44px;
        padding: 12px 10px;
    }

    .wb-acc__qty {
        min-height: 44px;
        gap: 6px;
    }

    .wb-acc__qty button {
        width: 44px;
        height: 44px;
        border-radius: 12px;
        flex: 0 0 44px;
    }

    .wb-acc__qty input {
        width: 44px;
        min-height: 44px;
        font-size: 16px;
    }

    .wb-acc > input[type="checkbox"] {
        width: 22px;
        height: 22px;
        top: 12px;
        left: 12px;
    }

    .wb-series {
        min-height: 44px;
    }

    .wb-bom {
        gap: 16px;
    }

    .wb-bom-table th,
    .wb-bom-table td {
        padding: 10px 8px;
        font-size: 13px;
    }

    .wb-lead-field input {
        min-height: 48px;
        font-size: 16px;
    }

    .wb-lead-submit {
        min-height: 52px;
        width: 100%;
    }

    .wb-result {
        padding: 18px 16px 22px;
    }

    .wb-calc__footer {
        z-index: 2;
    }
}

@media (max-width: 560px) {
    .wb-calc-section__title {
        font-size: 22px;
    }

    .wb-calc-section__lead {
        font-size: 14px;
    }

    .wb-calc__main,
    .wb-calc__footer-qty,
    .wb-calc__footer-actions,
    .wb-calc__side,
    .wb-result {
        padding-left: 14px;
        padding-right: 14px;
    }

    .wb-step__title {
        font-size: 18px;
    }

    .wb-series-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .wb-acc-list {
        grid-template-columns: 1fr;
    }

    .wb-btn {
        min-height: 48px;
        border-radius: 14px;
        padding: 0 16px;
    }

    .wb-preview-wrap {
        height: min(190px, 30vh);
        max-height: min(190px, 30vh);
    }

    .wb-preview-wrap .preview {
        transform: scale(0.62);
    }

    .wb-bom-summary {
        flex-wrap: wrap;
        gap: 8px;
    }
}
