:root {
    --bm-cart-ink: #0c3d3d;
    --bm-cart-muted: #718482;
    --bm-cart-line: #d9e5e3;
    --bm-cart-soft: #f4f8f7;
    --bm-cart-coral: #ff5b53;
    --bm-cart-coral-dark: #e94a43;
    --bm-cart-success: #08766f;
}

.bm-cart-page,
.bm-cart-page * {
    box-sizing: border-box;
}

.bm-cart-page {
    min-height: 620px;
    padding-bottom: 80px;
    color: var(--bm-cart-ink);
    background: #fff;
}

/* Author CSS có display:flex/grid sẽ thắng style [hidden] mặc định của trình
   duyệt nếu không khóa quy tắc này. */
.bm-cart-page [hidden] {
    display: none !important;
}

.bm-cart-container {
    width: min(1240px, calc(100% - 40px));
    margin-inline: auto;
}

.bm-cart-breadcrumb {
    display: flex;
    min-height: 48px;
    align-items: center;
    gap: 9px;
    color: #81908f;
    font-size: 13px;
}

.bm-cart-breadcrumb a {
    color: inherit;
    text-decoration: none;
}

.bm-cart-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding: 35px 0 27px;
    border-bottom: 1px solid var(--bm-cart-line);
}

.bm-cart-eyebrow {
    display: block;
    margin-bottom: 8px;
    color: #788e8c;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.bm-cart-heading h1 {
    margin: 0;
    color: var(--bm-cart-ink);
    font-size: clamp(31px, 4vw, 48px);
    line-height: 1.08;
}

.bm-cart-heading p {
    margin: 9px 0 0;
    color: var(--bm-cart-muted);
    font-size: 14px;
}

.bm-cart-continue {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    gap: 9px;
    color: var(--bm-cart-ink);
    font-weight: 700;
    text-decoration: none;
}

.bm-cart-continue:hover {
    color: var(--bm-cart-coral-dark);
}

.bm-cart-loading {
    display: flex;
    min-height: 260px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--bm-cart-muted);
}

.bm-cart-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #d5e1df;
    border-top-color: var(--bm-cart-ink);
    border-radius: 50%;
    animation: bm-cart-spin .7s linear infinite;
}

@keyframes bm-cart-spin {
    to { transform: rotate(360deg); }
}

.bm-cart-loading button {
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid var(--bm-cart-line);
    border-radius: 9px;
    color: var(--bm-cart-ink);
    background: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.bm-cart-empty {
    min-height: 410px;
    padding: 62px 20px;
    text-align: center;
}

.bm-cart-empty__icon {
    display: grid;
    width: 88px;
    height: 88px;
    margin: 0 auto 21px;
    place-items: center;
    border-radius: 50%;
    color: #547976;
    background: var(--bm-cart-soft);
}

.bm-cart-empty__icon svg {
    width: 42px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.55;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.bm-cart-empty h2 {
    margin: 0 0 10px;
    color: var(--bm-cart-ink);
    font-size: 27px;
}

.bm-cart-empty p {
    max-width: 540px;
    margin: 0 auto 25px;
    color: var(--bm-cart-muted);
    line-height: 1.7;
}

.bm-cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 390px);
    gap: 36px;
    align-items: start;
    padding-top: 34px;
}

.bm-cart-products {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--bm-cart-line);
    border-radius: 16px;
    background: #fff;
}

.bm-cart-products__header {
    display: flex;
    min-height: 67px;
    padding: 0 22px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--bm-cart-line);
}

.bm-cart-products__header h2,
.bm-cart-summary h2 {
    margin: 0;
    color: var(--bm-cart-ink);
    font-size: 20px;
}

.bm-cart-products__header button {
    border: 0;
    color: #9a4a45;
    background: transparent;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.bm-cart-item {
    position: relative;
    display: grid;
    grid-template-columns: 142px minmax(0, 1fr) auto;
    gap: 19px;
    padding: 22px;
    border-bottom: 1px solid var(--bm-cart-line);
}

.bm-cart-item:last-child {
    border-bottom: 0;
}

.bm-cart-item__image {
    display: block;
    width: 142px;
    /*height: 112px;*/
    overflow: hidden;
    border-radius: 11px;
    background: var(--bm-cart-soft);
}

.bm-cart-item__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bm-cart-item__info {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.bm-cart-item__info h3 {
    margin: 0;
    padding-right: 32px;
    color: var(--bm-cart-ink);
    font-size: 16px;
    line-height: 1.45;
}

.bm-cart-item__info h3 a {
    color: inherit;
    text-decoration: none;
}

.bm-cart-item__info h3 a:hover {
    color: var(--bm-cart-success);
}

.bm-cart-item__options {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 14px;
    margin: 8px 0 11px;
    color: var(--bm-cart-muted);
    font-size: 13px;
}

.bm-cart-item__options strong {
    color: #47615f;
    font-weight: 700;
}

.bm-cart-item__unit-price {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: baseline;
    margin-top: auto;
}

.bm-cart-item__unit-price strong {
    color: var(--bm-cart-coral-dark);
    font-size: 17px;
}

.bm-cart-item__unit-price del {
    color: #95a29f;
    font-size: 12px;
}

.bm-cart-item__actions {
    min-width: 130px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    padding-top: 34px;
}

.bm-cart-item__line-total {
    color: var(--bm-cart-ink);
    font-size: 17px;
    font-weight: 800;
}

.bm-cart-quantity {
    display: grid;
    grid-template-columns: 35px 44px 35px;
    height: 39px;
    overflow: hidden;
    border: 1px solid var(--bm-cart-line);
    border-radius: 9px;
}

.bm-cart-quantity button,
.bm-cart-quantity input {
    min-width: 0;
    border: 0;
    color: var(--bm-cart-ink);
    background: #fff;
    font: inherit;
    text-align: center;
}

.bm-cart-quantity button {
    cursor: pointer;
}

.bm-cart-quantity button:disabled {
    color: #b8c0bf;
    cursor: not-allowed;
}

.bm-cart-quantity input {
    width: 44px;
    border-inline: 1px solid var(--bm-cart-line);
    appearance: textfield;
}

.bm-cart-quantity input::-webkit-inner-spin-button,
.bm-cart-quantity input::-webkit-outer-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.bm-cart-item__stock {
    margin-top: 7px;
    color: var(--bm-cart-muted);
    font-size: 11px;
}

.bm-cart-item__remove {
    position: absolute;
    top: 17px;
    right: 17px;
    display: grid;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    color: #8c5551;
    background: #fff5f4;
    font-size: 20px;
    place-items: center;
    cursor: pointer;
}

.bm-cart-summary {
    position: sticky;
    top: 20px;
    padding: 25px;
    border: 1px solid var(--bm-cart-line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 14px 38px rgba(18, 59, 59, .07);
}

.bm-cart-freeship {
    margin: 20px 0 22px;
    padding: 15px;
    border-radius: 11px;
    background: #eff8f5;
}

.bm-cart-freeship__text {
    margin-bottom: 10px;
    color: #41625f;
    font-size: 13px;
    line-height: 1.5;
}

.bm-cart-freeship__text strong {
    color: var(--bm-cart-success);
}

.bm-cart-freeship__track {
    height: 7px;
    overflow: hidden;
    border-radius: 99px;
    background: #d8e8e4;
}

.bm-cart-freeship__track span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--bm-cart-success);
    transition: width .3s ease;
}

.bm-cart-totals {
    margin: 0;
}

.bm-cart-totals > div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 9px 0;
    color: var(--bm-cart-muted);
    font-size: 14px;
}

.bm-cart-totals dt,
.bm-cart-totals dd {
    margin: 0;
}

.bm-cart-totals dd {
    color: var(--bm-cart-ink);
    font-weight: 700;
}

#bmCartDiscount {
    color: var(--bm-cart-success);
}

.bm-cart-totals > .bm-cart-totals__grand {
    margin-top: 10px;
    padding-top: 18px;
    border-top: 1px solid var(--bm-cart-line);
    color: var(--bm-cart-ink);
    font-size: 17px;
    font-weight: 800;
}

.bm-cart-totals__grand dd {
    color: var(--bm-cart-coral-dark);
    font-size: 23px;
}

.bm-cart-tax-note {
    margin: 9px 0 17px;
    color: #8b9997;
    font-size: 11px;
    line-height: 1.55;
}

.bm-cart-primary {
    display: inline-flex;
    min-height: 48px;
    padding: 0 22px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 10px;
    color: #fff;
    background: var(--bm-cart-coral);
    font: inherit;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: background .18s ease, transform .18s ease;
}

.bm-cart-primary:hover {
    color: #fff;
    background: var(--bm-cart-coral-dark);
    transform: translateY(-1px);
}

.bm-cart-checkout {
    width: 100%;
}

.bm-cart-policies {
    display: grid;
    gap: 10px;
    margin: 21px 0 0;
    padding: 19px 0 0;
    border-top: 1px solid var(--bm-cart-line);
    list-style: none;
    color: #607573;
    font-size: 12px;
}

.bm-cart-policies li {
    display: flex;
    gap: 9px;
}

.bm-cart-policies span {
    color: var(--bm-cart-success);
    font-weight: 800;
}

.bm-cart-page.is-busy .bm-cart-products,
.bm-cart-page.is-busy .bm-cart-summary {
    pointer-events: none;
    opacity: .7;
}

.bm-cart-toast {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 10040;
    max-width: min(390px, calc(100vw - 44px));
    padding: 13px 17px;
    border-radius: 10px;
    color: #fff;
    background: #103f3e;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .22);
    opacity: 0;
    pointer-events: none;
    transform: translateY(14px);
    transition: opacity .2s ease, transform .2s ease;
}

.bm-cart-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.bm-cart-toast.is-error {
    background: #b43d38;
}

@media (max-width: 980px) {
    .bm-cart-layout {
        grid-template-columns: 1fr;
    }

    .bm-cart-summary {
        position: static;
    }
}

@media (max-width: 680px) {
    .bm-cart-container {
        width: min(100% - 26px, 1240px);
    }

    .bm-cart-page {
        padding-bottom: 48px;
    }

    .bm-cart-heading {
        align-items: flex-start;
        flex-direction: column;
        padding-top: 22px;
    }

    .bm-cart-layout {
        gap: 20px;
        padding-top: 22px;
    }

    .bm-cart-products__header {
        min-height: 58px;
        padding-inline: 15px;
    }

    .bm-cart-item {
        grid-template-columns: 104px minmax(0, 1fr);
        gap: 13px;
        padding: 15px;
    }

    .bm-cart-item__image {
        width: 104px;
        height: 91px;
    }

    .bm-cart-item__info h3 {
        padding-right: 27px;
        font-size: 14px;
    }

    .bm-cart-item__options {
        display: grid;
        gap: 3px;
        margin-block: 6px;
        font-size: 12px;
    }

    .bm-cart-item__unit-price strong {
        font-size: 15px;
    }

    .bm-cart-item__actions {
        grid-column: 1 / -1;
        width: 100%;
        min-width: 0;
        flex-direction: row-reverse;
        align-items: center;
        padding-top: 0;
    }

    .bm-cart-summary {
        padding: 20px 17px;
    }
}

@media (max-width: 390px) {
    .bm-cart-item {
        grid-template-columns: 90px minmax(0, 1fr);
    }

    .bm-cart-item__image {
        width: 90px;
        height: 85px;
    }
}
