/* ── Product Quantity Buttons ─────────────────────────────────────────────── */

.kw-qb {
    background: #F7F7F7;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    font-family: inherit;
}

/* ── Tabs ────────────────────────────────────────────────────────────────── */
.kw-qb__tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid #E3E3E3;
    border-radius: 9px;
    overflow: hidden;
    margin-bottom: 16px;
}

.kw-qb__tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 12px;
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    color: #727377;
    background: #fff;
    border: none;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
    font-family: inherit;
    line-height: 1;
}

.kw-qb__tab + .kw-qb__tab {
    border-left: 1px solid #E3E3E3;
}

.kw-qb__tab::before {
    content: '';
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1.5px solid #D7D7D8;
    flex-shrink: 0;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.kw-qb__tab--active {
    background: #F7F7F7;
    color: #27282A;
    font-weight: 600;
}

.kw-qb__tab--active::before {
    border-color: var(--kw-qb-tab-active, #27282A);
    box-shadow: inset 0 0 0 3px #F7F7F7, inset 0 0 0 7px var(--kw-qb-tab-active, #27282A);
}

/* ── Tier buttons ────────────────────────────────────────────────────────── */
.kw-qb__buttons {
    display: flex;
    gap: 8px;
}

.kw-qb__btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 14px 8px;
    background: #fff;
    border: 1.5px solid #E3E3E3;
    border-radius: 9px;
    cursor: pointer;
    text-align: center;
    color: inherit;
    font-family: inherit;
    transition: border-color 0.15s ease, background-color 0.15s ease;
    min-height: 80px;
}

.kw-qb__btn:hover {
    border-color: #9C9EA3;
}

.kw-qb__btn--active {
    border-color: var(--kw-qb-active-border, var(--kw-qb-accent, #27282A));
    border-width: 2px;
}

.kw-qb__btn-qty {
    font-size: 16px;
    font-weight: 700;
    color: #27282A;
    line-height: 1;
}

.kw-qb__btn-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--kw-qb-label-text, #fff);
    background: var(--kw-qb-label-bg, #27282A);
    padding: 2px 8px;
    border-radius: 6px;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.kw-qb__btn-label:empty {
    display: none;
}

.kw-qb__btn-price {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
}

.kw-qb__btn-unit-price {
    font-size: 14px;
    font-weight: 600;
    color: #27282A;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px;
    line-height: 1.3;
}

.kw-qb__btn-unit-price .woocommerce-Price-amount {
    color: inherit;
}

.kw-qb__btn-suffix {
    font-size: 12px;
    color: #9C9EA3;
    font-weight: 400;
}

.kw-qb__btn-total {
    font-size: 11px;
    color: #9C9EA3;
}

.kw-qb__btn-total .woocommerce-Price-amount {
    color: inherit;
}

/* ── Period options ───────────────────────────────────────────────────────── */
.kw-qb__sub-options {
    margin-top: 12px;
}

.kw-qb__period-label {
    margin: 0 0 8px;
    font-size: 12px;
    color: #727377;
    text-align: center;
}

.kw-qb__sub-periods {
    display: flex;
    gap: 6px;
}

.kw-qb__period {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 6px;
    border: 1.5px solid #E3E3E3;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 500;
    color: #727377;
    background: #fff;
    cursor: pointer;
    user-select: none;
    text-align: center;
    font-family: inherit;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.kw-qb__period:hover {
    border-color: #9C9EA3;
    color: #27282A;
}

.kw-qb__period--active {
    border-color: var(--kw-qb-active-border, var(--kw-qb-accent, #27282A));
    border-width: 2px;
    color: #27282A;
    font-weight: 600;
}

.kw-qb__period-radio {
    display: none;
}

/* ── Tablet ──────────────────────────────────────────────────────────────── */
@media (max-width: 849px) {
    .kw-qb {
        padding: 16px;
    }
}

/* ── Mobile ──────────────────────────────────────────────────────────────── */
@media (max-width: 549px) {
    .kw-qb {
        padding: 12px;
        border-radius: 9px;
    }

    .kw-qb__btn {
        padding: 12px 4px;
        min-height: 68px;
    }

    .kw-qb__btn-qty {
        font-size: 14px;
    }

    .kw-qb__btn-unit-price {
        font-size: 13px;
    }

    .kw-qb__period {
        padding: 8px 4px;
        font-size: 12px;
    }
}
