.sfb-wrap,
.sfb-wrap * {
    box-sizing: border-box;
}

.sfb-wrap {
    --sfb-accent: var(--wd-primary-color, #2563eb);
    --sfb-title: var(--wd-title-color, #111827);
    --sfb-text: var(--wd-text-color, #475569);
    --sfb-muted: #64748b;
    --sfb-border: rgba(15, 23, 42, 0.10);
    --sfb-soft: #f8fafc;
    --sfb-success: #16a34a;
    --sfb-danger: #e11d48;
    direction: ltr;
    text-align: left;
    width: 100%;
    margin: 16px 0;
    padding: 0;
    background: transparent;
    color: var(--sfb-text);
}

/* Compact deal bar */
.sfb-wrap .sfb-bundle-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 40px;
    margin: 0 0 9px;
    padding: 8px 10px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.035);
}

.sfb-wrap .sfb-bundle-strip-text {
    min-width: 0;
}

.sfb-wrap .sfb-bundle-strip-text span {
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f1f5f9;
    color: var(--sfb-title);
    font-size: 11px;
    font-weight: 850;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.sfb-wrap .sfb-bundle-strip-text strong {
    display: none;
}

.sfb-wrap .sfb-save-pill {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 8px 11px;
    border-radius: 999px;
    background: var(--sfb-success);
    color: #ffffff !important;
    box-shadow: 0 8px 18px rgba(22, 163, 74, .20);
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

.sfb-wrap .sfb-save-pill,
.sfb-wrap .sfb-save-pill *,
.sfb-wrap .sfb-save-pill .amount,
.sfb-wrap .sfb-save-pill bdi,
.sfb-wrap .sfb-save-pill .woocommerce-Price-currencySymbol {
    color: #ffffff !important;
}

.sfb-wrap .sfb-save-pill--neutral {
    background: var(--sfb-accent);
}

/* Product rows */
.sfb-wrap .sfb-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sfb-wrap .sfb-card {
    position: relative;
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px;
    border: 1px solid var(--sfb-border);
    border-radius: 15px;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.035);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.sfb-wrap .sfb-card:hover,
.sfb-wrap .sfb-card.is-selected {
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.055);
}

.sfb-wrap .sfb-card-select {
    border-left: 3px solid var(--sfb-accent);
}

.sfb-wrap .sfb-card-included {
    border-left: 3px solid var(--sfb-success);
}

.sfb-wrap .sfb-card-removed {
    border-left: 3px solid var(--sfb-danger);
    opacity: .84;
}

.sfb-wrap .sfb-card-image-wrap {
    width: 62px;
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    border: 1px solid #edf2f7;
    border-radius: 12px;
    background: #ffffff;
    overflow: hidden;
}

.sfb-wrap .sfb-card-image {
    width: 52px;
    height: 52px;
    max-width: 52px;
    max-height: 52px;
    object-fit: contain;
    display: block;
    border-radius: 9px;
}

.sfb-wrap .sfb-card-content {
    min-width: 0;
}

.sfb-wrap .sfb-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.sfb-wrap .sfb-card-title {
    display: -webkit-box !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    margin: 0 !important;
    padding: 0 !important;
    color: var(--sfb-title) !important;
    font-family: inherit !important;
    font-size: 14px !important;
    line-height: 1.24 !important;
    font-weight: 850 !important;
    letter-spacing: -0.01em !important;
    text-transform: none !important;
    overflow-wrap: anywhere;
}

.sfb-wrap .sfb-card-price {
    margin-top: 3px;
    color: var(--sfb-muted);
    font-size: 11px;
    line-height: 1.3;
}

.sfb-wrap .sfb-card-price strong,
.sfb-wrap .sfb-card-price .amount,
.sfb-wrap .sfb-card-price bdi,
.sfb-wrap .sfb-card-price .woocommerce-Price-currencySymbol {
    color: var(--sfb-title) !important;
    font-weight: 850;
}

.sfb-wrap .sfb-card-note {
    margin: 2px 0 0;
    color: var(--sfb-muted);
    font-size: 11px;
    line-height: 1.3;
}

.sfb-wrap .sfb-card-note:empty {
    display: none;
}

.sfb-wrap .sfb-card-control {
    margin-top: 6px;
}

.sfb-wrap .sfb-state-pill {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 23px;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 850;
    line-height: 1;
    white-space: nowrap;
}

.sfb-wrap .sfb-state-pill--select {
    background: rgba(37, 99, 235, .10);
    color: var(--sfb-accent);
}

.sfb-wrap .sfb-card.is-selected .sfb-state-pill--select {
    background: var(--sfb-accent);
    color: #ffffff;
}

.sfb-wrap .sfb-state-pill--included {
    background: #ecfdf5;
    color: var(--sfb-success);
}

.sfb-wrap .sfb-state-pill--removed {
    background: #fff1f2;
    color: var(--sfb-danger);
}

.sfb-wrap .sfb-field-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 5px;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(37, 99, 235, .10);
    color: var(--sfb-accent);
    font-size: 10px;
    font-weight: 850;
    line-height: 1;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.sfb-wrap .sfb-select {
    width: 100%;
    min-height: 36px;
    padding: 0 11px;
    border: 1px solid #d7dde6;
    border-radius: 12px;
    background: #ffffff;
    color: var(--sfb-title);
    font-size: 13px;
    font-weight: 750;
    line-height: 1.2;
    outline: none;
    appearance: auto;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.sfb-wrap .sfb-select:focus {
    border-color: var(--sfb-accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .10);
}

.sfb-wrap .sfb-choice-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sfb-wrap .sfb-flavor-chip {
    display: inline-flex;
    max-width: 100%;
    cursor: pointer;
    user-select: none;
}

.sfb-wrap .sfb-flavor-chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.sfb-wrap .sfb-flavor-chip span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    max-width: 100%;
    padding: 7px 10px;
    border: 1px solid #d7dde6;
    border-radius: 999px;
    background: #ffffff;
    color: var(--sfb-title);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.15;
    white-space: normal;
    overflow-wrap: anywhere;
    transition: border-color .18s ease, background-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.sfb-wrap .sfb-flavor-chip input:checked + span {
    border-color: var(--sfb-accent);
    background: var(--sfb-accent);
    color: #ffffff;
    box-shadow: 0 7px 16px rgba(37,99,235,.16);
}

.sfb-wrap .sfb-auto-choice,
.sfb-wrap .sfb-removed-choice {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: auto;
    max-width: 100%;
    min-height: 32px;
    padding: 6px 10px;
    border-radius: 12px;
}

.sfb-wrap .sfb-auto-choice {
    border: 1px solid rgba(22,163,74,.18);
    background: #f0fdf4;
}

.sfb-wrap .sfb-removed-choice {
    border: 1px solid rgba(225,29,72,.18);
    background: #fff1f2;
}

.sfb-wrap .sfb-auto-choice strong,
.sfb-wrap .sfb-removed-choice strong {
    display: block;
    color: var(--sfb-title);
    font-size: 12px;
    font-weight: 850;
    line-height: 1.12;
}

.sfb-wrap .sfb-auto-choice small,
.sfb-wrap .sfb-removed-choice small {
    display: block;
    margin-top: 1px;
    color: var(--sfb-muted);
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1.2;
}

.sfb-wrap .sfb-checkmark,
.sfb-wrap .sfb-remove-icon {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
}

.sfb-wrap .sfb-checkmark {
    background: var(--sfb-success);
}

.sfb-wrap .sfb-remove-icon {
    background: var(--sfb-danger);
}

/* Compact price summary */
.sfb-wrap .sfb-price-summary {
    margin-top: 10px;
    padding: 12px 13px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 7px 18px rgba(15, 23, 42, 0.035);
}

.sfb-wrap .sfb-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 4px 0;
    color: var(--sfb-muted);
    font-size: 12px;
    line-height: 1.35;
}

.sfb-wrap .sfb-price-row strong {
    color: var(--sfb-title);
    font-size: 13px;
    font-weight: 850;
    white-space: nowrap;
}

.sfb-wrap .sfb-credit-row strong {
    color: var(--sfb-danger);
}

.sfb-wrap .sfb-saving-row strong {
    color: var(--sfb-success);
}

.sfb-wrap .sfb-muted-row strong {
    color: var(--sfb-muted);
}

.sfb-wrap .sfb-total-row {
    margin-top: 4px;
    padding-top: 9px;
    border-top: 1px solid #e9eef5;
}

.sfb-wrap .sfb-total-row span {
    color: var(--sfb-title);
    font-size: 13px;
    font-weight: 850;
}

.sfb-wrap .sfb-total-row strong {
    color: var(--sfb-title);
    font-size: 17px;
    font-weight: 950;
}

.sfb-wrap .sfb-empty-warning {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 13px;
    background: #fff1f2;
    color: var(--sfb-danger);
    font-size: 12px;
    font-weight: 750;
    line-height: 1.45;
}

.woocommerce-cart .variation dt,
.woocommerce-checkout .variation dt {
    font-weight: 800;
}

@media (max-width: 680px) {
    .sfb-wrap {
        margin: 14px 0;
    }

    .sfb-wrap .sfb-bundle-strip {
        min-height: 36px;
        padding: 7px 9px;
        border-radius: 13px;
    }

    .sfb-wrap .sfb-bundle-strip-text span {
        padding: 5px 8px;
        font-size: 10px;
    }

    .sfb-wrap .sfb-save-pill {
        min-height: 28px;
        padding: 7px 9px;
        font-size: 11px;
    }

    .sfb-wrap .sfb-card {
        grid-template-columns: 54px minmax(0, 1fr);
        gap: 8px;
        padding: 8px;
        border-radius: 14px;
    }

    .sfb-wrap .sfb-card-image-wrap {
        width: 54px;
        height: 54px;
        border-radius: 11px;
    }

    .sfb-wrap .sfb-card-image {
        width: 44px;
        height: 44px;
        max-width: 44px;
        max-height: 44px;
    }

    .sfb-wrap .sfb-card-title {
        font-size: 13px !important;
        line-height: 1.22 !important;
    }

    .sfb-wrap .sfb-card-note,
    .sfb-wrap .sfb-card-price {
        font-size: 10.5px;
    }

    .sfb-wrap .sfb-state-pill {
        min-height: 21px;
        padding: 5px 7px;
        font-size: 9px;
    }

    .sfb-wrap .sfb-card-control {
        margin-top: 5px;
    }

    .sfb-wrap .sfb-field-label {
        margin-bottom: 4px;
        padding: 4px 7px;
        font-size: 9px;
    }

    .sfb-wrap .sfb-select {
        min-height: 35px;
        font-size: 12.5px;
    }

    .sfb-wrap .sfb-price-summary {
        padding: 11px 12px;
        border-radius: 15px;
    }
}


/* Compact expiry/date metadata. */
.sfb-wrap .sfb-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3px 10px;
    margin-top: 3px;
}

.sfb-wrap .sfb-card-meta .sfb-card-price {
    margin-top: 0;
}

.sfb-wrap .sfb-card-expiry {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: var(--sfb-muted);
    font-size: 11px;
    line-height: 1.3;
    font-weight: 650;
}

.sfb-wrap .sfb-card-expiry::before {
    content: "";
    width: 4px;
    height: 4px;
    border-radius: 999px;
    background: #cbd5e1;
}

.sfb-wrap .sfb-card-expiry strong {
    color: var(--sfb-title);
    font-weight: 850;
}

.sfb-wrap .sfb-card-expiry.is-empty {
    display: none;
}

@media (max-width: 680px) {
    .sfb-wrap .sfb-card-expiry {
        font-size: 10.5px;
    }
}
