.bk-bd-wrap {
    --bd-accent: var(--m_accent_color2, var(--accent_color2, #ef3743));
    --bd-ink: #1f2430;
    --bd-text: #42507a;
    --bd-muted: #6b7280;
    --bd-line: #eceef2;
    --bd-soft: #f6f7f9;
    --bd-card: #fff;
    --bd-ok: #0a8f5a;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 24px 0;
    padding: 18px;
    border: 1px solid var(--bd-line);
    border-radius: 20px;
    background: var(--bd-card);
    color: var(--bd-ink);
    direction: rtl;
    text-align: right;
    clear: both;
}

.bk-bd-wrap * {
    box-sizing: border-box;
}

.bk-bd-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bk-bd-head strong {
    color: var(--bd-ink);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.6;
}

.bk-bd-ic {
    display: grid;
    flex: none;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--bd-accent) 11%, var(--bd-card));
    color: var(--bd-accent);
}

.bk-bd {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bk-bd + .bk-bd {
    padding-top: 14px;
    border-top: 1px dashed var(--bd-line);
}

.bk-bd-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bk-bd-title b {
    color: var(--bd-ink);
    font-size: 14px;
    font-weight: 700;
}

.bk-bd-title small {
    color: var(--bd-muted);
    font-size: 12.5px;
    line-height: 1.8;
}

.bk-bd-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    align-items: stretch;
    gap: 16px;
}

.bk-bd-items {
    display: flex;
    align-items: stretch;
    gap: 8px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
}

.bk-bd-item {
    position: relative;
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    gap: 6px;
    min-width: 132px;
    max-width: 210px;
    padding: 10px;
    border: 1px solid var(--bd-line);
    border-radius: 16px;
    background: var(--bd-card);
    scroll-snap-align: start;
}

.bk-bd-item.is-current {
    border-color: color-mix(in srgb, var(--bd-accent) 35%, var(--bd-line));
}

.bk-bd-thumb {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    border-radius: 12px;
    background: var(--bd-soft);
    overflow: hidden;
}

.bk-bd-thumb img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 6px;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.bk-bd-qty {
    position: absolute;
    top: 6px;
    left: 6px;
    padding: 0 7px;
    border-radius: 8px;
    background: var(--bd-ink);
    color: #fff;
    font-size: 11px;
    font-style: normal;
    font-weight: 700;
    line-height: 20px;
}

.bk-bd-this {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 0 8px;
    border-radius: 8px;
    background: var(--bd-accent);
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 20px;
}

.bk-bd-name {
    display: -webkit-box;
    min-height: 3.6em;
    overflow: hidden;
    color: var(--bd-ink) !important;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.8;
    text-decoration: none !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.bk-bd-name:hover {
    color: var(--bd-accent) !important;
}

.bk-bd-price {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: auto;
    line-height: 1.6;
}

.bk-bd-price del {
    color: var(--bd-muted);
    font-size: 11.5px;
    opacity: .85;
}

.bk-bd-price > span {
    color: var(--bd-ink);
    font-size: 13.5px;
    font-weight: 800;
}

.bk-bd-plus {
    display: grid;
    flex: none;
    align-self: center;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--bd-soft);
    color: var(--bd-muted);
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
}

.bk-bd-sum {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 16px;
    border-radius: 16px;
    background: var(--bd-soft);
}

.bk-bd-sum-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bk-bd-off {
    padding: 0 8px;
    border-radius: 999px;
    background: var(--bd-accent);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 22px;
}

.bk-bd-sum-row del {
    color: var(--bd-muted);
    font-size: 13px;
}

.bk-bd-total {
    color: var(--bd-ink);
    font-size: 20px;
    font-weight: 900;
    line-height: 1.6;
}

.bk-bd-save {
    color: var(--bd-ok);
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.8;
}

.bk-bd-save .amount,
.bk-bd-save bdi {
    font-weight: 800;
}

.bk-bd-wrap .bk-bd-add {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 46px;
    margin-top: 6px;
    padding: 0 14px;
    border: 0;
    border-radius: 12px;
    background: var(--bd-accent);
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: filter .2s ease, transform .1s ease;
}

.bk-bd-wrap .bk-bd-add:hover {
    filter: brightness(.94);
}

.bk-bd-wrap .bk-bd-add:active {
    transform: scale(.98);
}

.bk-bd-wrap .bk-bd-add:focus-visible {
    outline: 2px solid var(--bd-accent);
    outline-offset: 2px;
}

.bk-bd-wrap .bk-bd-add.is-added {
    background: var(--bd-ok);
}

.bk-bd-spin {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: bk-bd-spin .7s linear infinite;
}

.bk-bd-add.is-loading .bk-bd-spin {
    display: block;
}

.bk-bd-add.is-loading {
    cursor: progress;
    opacity: .85;
}

@keyframes bk-bd-spin {
    to {
        transform: rotate(360deg);
    }
}

.bk-bd-msg {
    font-size: 12.5px;
    line-height: 1.8;
}

.bk-bd-msg:empty {
    display: none;
}

.bk-bd-msg.is-ok {
    color: var(--bd-ok);
}

.bk-bd-msg.is-err {
    color: #d92d20;
}

.bk-bd-msg a {
    color: var(--bd-accent) !important;
    font-weight: 700;
    text-decoration: underline !important;
}

@media (max-width: 991px) {
    .bk-bd-body {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 767px) {
    .bk-bd-wrap {
        margin: 12px 0;
        padding: 14px;
        border-radius: 16px;
    }

    .bk-bd-head strong {
        font-size: 14.5px;
    }

    .bk-bd-items {
        margin: 0 -14px;
        padding: 0 14px 4px;
        scroll-padding: 0 14px;
        scrollbar-width: none;
    }

    .bk-bd-items::-webkit-scrollbar {
        display: none;
    }

    .bk-bd-item {
        flex: 0 0 136px;
        min-width: 136px;
    }

    .bk-bd-plus {
        width: 22px;
        height: 22px;
        font-size: 14px;
    }

    .bk-bd-sum {
        padding: 12px 14px;
    }

    .bk-bd-total {
        font-size: 18px;
    }
}
