/* ============================================================
   Bundle Widget — Mua kèm tiết kiệm
   Loads on all single product pages via mitn-bundle handle.
   ============================================================ */

.bundle-box {
    display: flex;
    align-items: center;
    gap: var(--s-5, 1.25rem);
    padding: var(--s-4, 1rem) var(--s-5, 1.25rem);
    border: 1px solid var(--color-border-subtle, #e5e7eb);
    border-radius: var(--radius-lg, 12px);
    flex-wrap: wrap;
}

/* ─── Product pair ──────────────────────────────────────── */
.bundle-items {
    display: flex;
    align-items: center;
    gap: var(--s-3, 0.75rem);
    flex: 1;
    min-width: 0;
    flex-wrap: wrap;
}

.bundle-item {
    display: flex;
    align-items: center;
    gap: var(--s-2, 0.5rem);
}

.bundle-item__img {
    width: 56px;
    height: 56px;
    background: var(--color-surface-sunken, #f2f4f7);
    border-radius: var(--radius-md, 8px);
    display: grid;
    place-items: center;
    flex-shrink: 0;
    overflow: hidden;
}

.bundle-item__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bundle-item__img svg {
    width: 26px;
    height: 26px;
    color: var(--color-text-subtle, #6b7280);
}

.bundle-item__info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.bundle-item__name {
    font-size: var(--fs-sm, 0.875rem);
    font-weight: 600;
    color: var(--color-text-primary, #111);
    line-height: 1.4;
    max-width: 200px;
}

.bundle-item__price {
    font-size: var(--fs-sm, 0.875rem);
    font-weight: 700;
    color: var(--color-brand-primary, #dd3333);
}

.bundle-item__original {
    font-size: var(--fs-xs, 0.75rem);
    color: var(--color-text-subtle, #6b7280);
    text-decoration: line-through;
}

.bundle-plus {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-text-subtle, #6b7280);
    flex-shrink: 0;
    padding: 0 var(--s-1, 0.25rem);
}

/* ─── CTA (price + button) ──────────────────────────────── */
.bundle-cta {
    display: flex;
    align-items: center;
    gap: var(--s-4, 1rem);
    flex-shrink: 0;
    margin-left: auto;
}

.bundle-cta__total {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.bundle-cta__label {
    font-size: var(--fs-xs, 0.75rem);
    color: var(--color-text-muted, #4b5563);
    white-space: nowrap;
}

.bundle-cta__savings {
    color: var(--color-status-success, #16a34a);
}

.bundle-cta__price {
    font-size: var(--fs-lg, 1.25rem);
    font-weight: 800;
    color: var(--color-brand-primary, #dd3333);
    white-space: nowrap;
}

/* Override Flatsome button resets */
.bundle-cta__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px var(--s-5, 1.25rem) !important;
    background: var(--color-brand-primary, #dd3333) !important;
    color: #fff !important;
    border: none !important;
    border-radius: var(--radius-md, 8px) !important;
    font-size: var(--fs-sm, 0.875rem) !important;
    font-weight: 700 !important;
    line-height: 1.5 !important;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, opacity 0.15s;
    text-transform: none !important;
    letter-spacing: 0 !important;
    box-shadow: none !important;
    min-height: unset !important;
}

.bundle-cta__btn:hover {
    background: #c42d2d !important;
    color: #fff !important;
}

.bundle-cta__btn.is-loading {
    opacity: 0.65;
    pointer-events: none;
}

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 768px) {
    .bundle-box {
        flex-direction: column;
        align-items: stretch;
        gap: var(--s-4, 1rem);
    }

    .bundle-cta {
        flex-direction: column-reverse;
        align-items: stretch;
        margin-left: 0;
    }

    .bundle-cta__total {
        align-items: flex-start;
    }

    .bundle-cta__btn {
        width: 100%;
        justify-content: center;
    }
}
