.smc-calculator {
    --smc-pink: #e61e8d;
    --smc-pink-dark: #c91577;
    --smc-black: #111111;
    --smc-text: #22242a;
    --smc-muted: #70727a;
    --smc-panel: #ffffff;
    --smc-soft: #f7f7f8;
    --smc-border: #e5e5e8;
    margin: 16px 0 14px;
    border: 1px solid var(--smc-border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--smc-panel);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
    color: var(--smc-text);
    font-size: 15px;
    line-height: 1.35;
}

.smc-calculator *,
.smc-calculator *::before,
.smc-calculator *::after {
    box-sizing: border-box;
}

.smc-calculator__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 54px;
    padding: 10px 16px;
    border-bottom: 3px solid var(--smc-pink);
    background: linear-gradient(135deg, #0d0d0e 0%, #262629 100%);
    color: #fff;
}

.smc-calculator__title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 20px;
    font-weight: 750;
    line-height: 1.15;
    letter-spacing: -.2px;
}

.smc-calculator__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 8px;
    background: rgba(230, 30, 141, .17);
    color: var(--smc-pink);
}

.smc-calculator__icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.smc-calculator__unit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.smc-calculator__unit select {
    min-width: 68px;
    height: 36px;
    margin: 0 !important;
    padding: 5px 27px 5px 10px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 7px;
    background-color: #fff;
    color: var(--smc-black);
    font-size: 15px;
    font-weight: 700;
    box-shadow: none;
}

.smc-calculator__unit select:focus {
    border-color: var(--smc-pink);
    outline: 2px solid rgba(230, 30, 141, .22);
    outline-offset: 1px;
}

.smc-calculator__body {
    padding: 15px 16px 13px;
    background: #fff;
}

.smc-dimensions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr);
    align-items: end;
    gap: 10px;
}

.smc-field {
    display: block;
    min-width: 0;
    margin: 0;
}

.smc-field__label {
    display: block;
    margin: 0 0 5px;
    color: #303138;
    font-size: 13px;
    font-weight: 700;
}

.smc-field__control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 40px;
    min-height: 46px;
}

.smc-field__control input {
    width: 100%;
    min-width: 0;
    height: 46px;
    margin: 0 !important;
    padding: 8px 11px !important;
    border: 1px solid #d7d7dc !important;
    border-right: 0 !important;
    border-radius: 8px 0 0 8px !important;
    background: #fff !important;
    color: var(--smc-text) !important;
    font-size: 16px !important;
    font-weight: 650;
    text-align: center;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .025) !important;
    transition: border-color .18s ease, box-shadow .18s ease;
    -moz-appearance: textfield;
}

.smc-field__control input::-webkit-inner-spin-button,
.smc-field__control input::-webkit-outer-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.smc-field__control:focus-within input {
    border-color: var(--smc-pink) !important;
    box-shadow: 0 0 0 3px rgba(230, 30, 141, .10) !important;
    outline: none;
}

.smc-field__suffix {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d7d7dc;
    border-left: 0;
    border-radius: 0 8px 8px 0;
    background: #f0f0f2;
    color: #3b3c42;
    font-size: 13px;
    font-weight: 750;
}

.smc-dimensions__multiply {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-bottom: 9px;
    border-radius: 50%;
    background: rgba(230, 30, 141, .10);
    color: var(--smc-pink);
    font-size: 21px;
    font-weight: 500;
    line-height: 1;
}

.smc-options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    padding: 9px 11px;
    border: 1px solid #ededf0;
    border-radius: 8px;
    background: var(--smc-soft);
}

.smc-contact-link {
    color: #3a3b41;
    font-size: 12.5px;
    font-weight: 650;
    text-decoration: none;
}

.smc-contact-link:hover,
.smc-contact-link:focus {
    color: var(--smc-pink-dark);
    text-decoration: underline;
}

.smc-wastage-option {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    white-space: nowrap;
    color: #292a2f;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
}

.smc-wastage-option input {
    width: 17px;
    height: 17px;
    margin: 0 !important;
    accent-color: var(--smc-pink);
    cursor: pointer;
}

.smc-results {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(90px, .72fr) minmax(0, 1.25fr);
    gap: 8px;
    margin-top: 11px;
}

.smc-result-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    min-height: 78px;
    padding: 10px 11px;
    border: 1px solid #ebebee;
    border-radius: 9px;
    background: var(--smc-soft);
}

.smc-results__label {
    display: block;
    margin-bottom: 3px;
    color: var(--smc-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .45px;
    line-height: 1.2;
    text-transform: uppercase;
}

.smc-result-card > strong {
    color: #202126;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.12;
    white-space: nowrap;
}

.smc-result-card > strong small {
    font-size: 13px;
    font-weight: 700;
}

.smc-result-card > small {
    margin-top: 4px;
    overflow: hidden;
    color: var(--smc-muted);
    font-size: 11.5px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.smc-results__packs {
    text-align: center;
}

.smc-results__price {
    border-color: rgba(230, 30, 141, .24);
    background: linear-gradient(135deg, rgba(230, 30, 141, .075), rgba(230, 30, 141, .025));
    text-align: right;
}

.smc-total-price {
    color: var(--smc-pink) !important;
    font-size: 21px !important;
    font-weight: 850 !important;
}

.smc-stock {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #ededf0;
}

.smc-stock__status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #202126;
    font-size: 13px;
    font-weight: 750;
    white-space: nowrap;
}

.smc-stock__check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 21px;
    height: 21px;
    border-radius: 50%;
    background: #ecf8ee;
    color: #15943b;
    font-size: 15px;
    font-weight: 900;
    line-height: 1;
}

.smc-stock.is-out-of-stock .smc-stock__check {
    background: #fff0f1;
    color: #c8202c;
}

.smc-stock__hint {
    color: #85868d;
    font-size: 11px;
    line-height: 1.25;
    text-align: right;
}

.smc-enabled-product form.cart .quantity.smc-source-quantity {
    display: none !important;
}

/* Compact brand-matched quantity control for classic checkout. */
.smc-checkout-quantity {
    display: inline-grid;
    grid-template-columns: 30px 44px 30px;
    align-items: center;
    margin: 5px 0 0 8px;
    overflow: hidden;
    vertical-align: middle;
    border: 1px solid #dadade;
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
}

.smc-checkout-qty-btn,
.smc-checkout-qty-input {
    height: 32px;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #fff;
    color: #202126;
    text-align: center;
    box-shadow: none !important;
}

.smc-checkout-qty-btn {
    padding: 0 !important;
    cursor: pointer;
    font-size: 17px;
    font-weight: 800;
}

.smc-checkout-qty-btn:hover,
.smc-checkout-qty-btn:focus {
    background: var(--smc-pink);
    color: #fff;
}

.smc-checkout-qty-input {
    width: 44px !important;
    padding: 0 3px !important;
    border-right: 1px solid #e4e4e7 !important;
    border-left: 1px solid #e4e4e7 !important;
    font-weight: 750;
    -moz-appearance: textfield;
}

.smc-checkout-qty-input::-webkit-inner-spin-button,
.smc-checkout-qty-input::-webkit-outer-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.smc-checkout-quantity.is-updating {
    opacity: .55;
    pointer-events: none;
}

@media (max-width: 767px) {
    .smc-calculator {
        margin: 14px 0 12px;
        font-size: 14px;
    }

    .smc-calculator__header {
        min-height: 50px;
        padding: 9px 12px;
    }

    .smc-calculator__title {
        gap: 8px;
        font-size: 18px;
    }

    .smc-calculator__icon {
        flex-basis: 29px;
        width: 29px;
        height: 29px;
    }

    .smc-calculator__unit {
        gap: 5px;
        font-size: 12px;
    }

    .smc-calculator__unit select {
        min-width: 62px;
        height: 34px;
        padding-left: 8px;
        font-size: 14px;
    }

    .smc-calculator__body {
        padding: 12px;
    }

    .smc-dimensions {
        grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr);
        gap: 7px;
    }

    .smc-field__control {
        grid-template-columns: minmax(0, 1fr) 35px;
    }

    .smc-field__control,
    .smc-field__control input {
        min-height: 43px;
        height: 43px;
    }

    .smc-field__control input {
        padding: 7px 6px !important;
        font-size: 15px !important;
    }

    .smc-dimensions__multiply {
        width: 24px;
        height: 24px;
        margin-bottom: 9px;
        font-size: 18px;
    }

    .smc-options-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
        padding: 8px 9px;
    }

    .smc-results {
        grid-template-columns: 1fr 1fr;
        gap: 7px;
    }

    .smc-results__price {
        grid-column: 1 / -1;
        text-align: left;
    }

    .smc-result-card {
        min-height: 70px;
        padding: 9px;
    }

    .smc-results__packs {
        text-align: left;
    }

    .smc-stock {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .smc-stock__hint {
        text-align: left;
    }
}

@media (max-width: 380px) {
    .smc-calculator__unit > span {
        display: none;
    }

    .smc-calculator__title {
        font-size: 17px;
    }

    .smc-field__label {
        font-size: 12px;
    }
}
