.bt-cart-page {
    /* primary */
    --bg-page: #f3f4f6;
    --bg-surface: #ffffff;
    --border-soft: #e5e7eb;
    --text-main: #111827;
    --text-muted: #6b7280;
    --radius-lg: 16px;
    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.08);
    --transition-fast: 0.15s ease-out;
}
.bt-cart-page img {
    max-width: 100%;
    display: block;
}
.bt-cart-page button {
    font-family: inherit;
    cursor: pointer;
}
.bt-cart-page input, button {
    border: none;
    outline: none;
}
/* ---------- TOKENS / THEME ---------- */

.bt-container {
    width: 100%;
    max-width: var(--container, 1120px);
    margin: 0 auto;
    padding: 24px 16px 96px;
}
/* ---------- PAGE HEADER ---------- */

.bt-cart-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}
.bt-breadcrumb {
    font-size: 13.6px;
    color: var(--text-muted);
    line-height: 40px;
}
.bt-breadcrumb span {
    opacity: 0.8;
}
.bt-cart-title-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}
.bt-cart-title-row h1 {
    margin: 0;
    font-size: 24px;
    letter-spacing: -0.03em;
}
.bt-cart-count {
    font-size: 14.4px;
    color: var(--text-muted);
}
.bt-cart-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    font-size: 13.6px;
    color: var(--text-muted);
}
.bt-cart-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 6.4px;
    padding: 2.4px 9.6px;
    border-radius: 999px;
    background: #e5e7eb;
    font-size: 12.8px;
}
.bt-cart-meta-pill strong {
    color: var(--barik-700, #7c0f0f);
}
/* ---------- LAYOUT ---------- */

.bt-cart-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
@media (min-width: 992px) {
    .bt-cart-layout {
        flex-direction: row;
        align-items: flex-start;
    }
}
.bt-cart-items {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 14.4px;
}
.bt-cart-summary {
    flex: 0 0 320px;
}
/* ---------- FLOATING SUMMARY (all screens ≥ 992px) ---------- */

@media (min-width: 992px) {
    .bt-cart-summary {
        position: sticky;
        top: 16px;
        /*        max-height: calc(100vh - 32px);*/
        /*        overflow-y: auto;*/
        scrollbar-width: thin;
        scrollbar-color: #e5e7eb transparent;
        align-self: flex-start;
    }
    .bt-cart-summary::-webkit-scrollbar {
        width: 4px;
    }
    .bt-cart-summary::-webkit-scrollbar-track {
        background: transparent;
    }
    .bt-cart-summary::-webkit-scrollbar-thumb {
        background: #e5e7eb;
        border-radius: 999px;
    }
}
/* ---------- CART ITEM ---------- */

.bt-cart-item {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 16px;
    padding: 14.4px 16px;
    border-radius: 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border-soft);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
    position: relative;
}
.bt-cart-item:hover {
    border-color: var(--barik-200, #f9d3d3);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
    transition: all var(--transition-fast);
}
.bt-cart-item-media {
    border-radius: 12px;
    overflow: hidden;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6.4px;
}
.bt-cart-item-media img {
    max-height: 80px;
    object-fit: contain;
}
.bt-cart-item-main {
    display: flex;
    flex-direction: column;
    gap: 6.4px;
}
.bt-cart-item-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}
.bt-cart-item-name {
    font-size: 15.68px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 2.4px;
}
.bt-cart-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9.6px;
    font-size: 12.8px;
    color: var(--text-muted);
}
.bt-tag {
    display: inline-flex;
    align-items: center;
    gap: 4.8px;
    padding: 1.92px 9.6px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
}
.bt-tag-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #22c55e;
}
.bt-tag-dot.low-stock {
    background: #f59e0b;
}
.bt-tag-dot.out-stock {
    background: #FF0000;
}
.bt-cart-item-bottom {
    display: flex;
    flex-wrap: wrap;
    gap: 9.6px;
    align-items: center;
    margin-top: 8px;
}
@media (min-width: 640px) {
    .bt-cart-item-bottom {
        justify-content: space-between;
    }
}
.bt-price-stack {
    text-align: right;
    margin-left: auto;
}
.bt-price-stack-label {
    font-size: 12px;
    color: var(--text-muted);
}
.bt-price-stack-value {
    font-weight: 600;
    font-size: 15.68px;
}
.bt-price-stack-original {
    font-size: 12px;
    text-decoration: line-through;
    color: #9ca3af;
}
.bt-remove-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12.8px;
    padding: 4.8px 8.8px;
    border-radius: 999px;
    background: transparent;
    color: var(--text-muted);
    margin-left: 1.6px;
    transition: color var(--transition-fast), background var(--transition-fast);
}
.bt-remove-item:hover {
    background: #fee2e2;
    color: var(--barik-700, #7c0f0f);
}
/* ---------- QTY CONTROL ---------- */

.bt-qty-control {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid var(--border-soft);
    background: #f9fafb;
    overflow: hidden;
}
.bt-qty-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14.4px;
    background: transparent;
    color: #374151;
    transition: background var(--transition-fast), color var(--transition-fast);
}
.bt-qty-btn:hover {
    background: #e5e7eb;
}
.bt-qty-input {
    width: 44px;
    border-left: 1px solid var(--border-soft);
    border-right: 1px solid var(--border-soft);
    background: #ffffff;
    text-align: center;
    font-size: 13.76px;
    padding: 1.6px 4.8px;
}
select.bt-qty-input {
    border: none;
}
.bt-qty-input::-webkit-inner-spin-button, .bt-qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
/* ---------- SUMMARY CARD ---------- */

.bt-summary-card {
    position: relative;
    padding: 17.6px 17.6px 19.2px;
    border-radius: var(--radius-lg);
    background: var(--bg-surface);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-soft);
}
.bt-summary-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}
.bt-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 14.4px;
    margin-bottom: 5.6px;
    color: #374151;
}
.bt-summary-row-muted {
    color: var(--text-muted);
}
.bt-summary-row-total {
    margin-top: 9.6px;
    padding-top: 9.6px;
    border-top: 1px dashed #e5e7eb;
    font-weight: 700;
    font-size: 16px;
}
.bt-summary-row-total span:last-child {
    color: var(--barik-700, #7c0f0f);
    font-size: 16.8px;
}
.bt-summary-note {
    font-size: 12.48px;
    color: var(--text-muted);
    margin-top: 2.4px;
}
/* ---------- COUPON ---------- */

.bt-coupon {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #e5e7eb;
}
.bt-coupon-label {
    font-size: 13.12px;
    font-weight: 500;
    margin-bottom: 5.6px;
}
.bt-coupon-form {
    display: flex;
    gap: 6.4px;
    margin-bottom: 4px;
}
.bt-input {
    flex: 1;
    min-width: 0;
    padding: 7.2px 11.2px;
    font-size: 13.6px;
    border-radius: 999px;
    border: 1px solid var(--border-soft) !important;
    background: #f9fafb;
    transition: border var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}
.bt-input:focus {
    border-color: var(--barik-400, #e88080);
    background: #ffffff;
    box-shadow: 0 0 0 1px rgba(161, 20, 20, 0.05);
}
.bt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    font-size: 13.76px;
    border-radius: 999px;
    border: none;
    background: #111827;
    color: #f9fafb;
    font-weight: 500;
    transition: background var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
    white-space: nowrap;
}
.bt-btn:hover {
    background: #030712;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.2);
    transform: translateY(-0.5px);
}
.bt-btn-primary {
    background: var(--barik-600, #a11414);
}
.bt-btn-primary:hover {
    background: var(--barik-700, #7c0f0f);
    box-shadow: 0 14px 34px rgba(161, 20, 20, 0.4);
}
.bt-btn-sm {
    padding: 5.6px 12.8px;
    font-size: 12.8px;
}
.bt-coupon-msg {
    font-size: 12.48px;
    min-height: 16px;
}
.bt-coupon-msg.success {
    color: #16a34a;
}
.bt-coupon-msg.error {
    color: #b91c1c;
}
/* ---------- CHECKOUT BUTTON ---------- */

.bt-checkout-btn {
    width: 100%;
    margin-top: 13.6px;
    padding: 12px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7.2px;
    font-size: 15.2px;
}
.bt-checkout-subtext {
    display: block;
    font-size: 11.52px;
    color: #fecaca;
    margin-top: 1.28px;
}
.bt-badges {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6.4px;
}
.bt-badge {
    display: inline-flex;
    align-items: center;
    gap: 4.8px;
    font-size: 11.52px;
    padding: 3.52px 8.8px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #374151;
}
.bt-badge i {
    font-size: 12.48px;
}
/* ---------- EMPTY STATE (optional style) ---------- */

.bt-empty {
    padding: 24px;
    border-radius: 16px;
    background: var(--bg-surface);
    border: 1px dashed var(--border-soft);
    text-align: center;
    font-size: 14.4px;
}
/* ---------- MOBILE CHECKOUT BAR ---------- */

.bt-mobile-checkout-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 8.8px 14.4px 10.4px;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    z-index: 30;
    color: #f9fafb;
}
.bt-mobile-checkout-bar-main {
    display: flex;
    flex-direction: column;
    gap: 0.8px;
}
.bt-mobile-checkout-label {
    font-size: 11.2px;
    opacity: 0.7;
}
.bt-mobile-checkout-total {
    font-size: 15.68px;
    font-weight: 600;
}
.bt-mobile-checkout-total span {
    font-size: 12.8px;
    font-weight: 400;
    margin-left: 2.4px;
    color: #e5e7eb;
}
.bt-mobile-checkout-btn {
    flex: 0 0 auto;
    padding: 9.6px 15.2px;
    font-size: 13.12px;
    border-radius: 999px;
    background: var(--barik-600, #a11414);
    color: #fef2f2;
    font-weight: 500;
    box-shadow: 0 12px 27px rgba(248, 113, 113, 0.5);
}
.bt-mobile-checkout-btn:hover {
    background: var(--barik-700, #7c0f0f);
}
@media (min-width: 992px) {
    .bt-mobile-checkout-bar {
        display: none;
    }
}
/* ---------- SMALL SCREENS TWEAK ---------- */

@media (max-width: 639px) {
    .bt-cart-item {
        grid-template-columns: 84px 1fr;
        padding: 12.8px 14.4px;
    }
    .bt-cart-header {
        margin-bottom: 16px;
    }
    .bt-container {
        padding-bottom: 72px;
        /* space for mobile bar */
    }
    .bt-checkout-subtext {
        display: none;
    }
    .bt-cart-page, .bt-container {
        padding: 0;
    }
}
.bt-toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    min-width: 220px;
    max-width: 320px;
    padding: 10px 14px;
    border-radius: 14px;
    background: #111827;
    color: #f9fafb;
    font-size: 13px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.45);
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 160ms ease-out, transform 160ms ease-out;
    z-index: 999;
}
.bt-toast.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.bt-warehouse-block {
    margin-bottom: 1.2rem;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: .8rem;
}
.bt-warehouse-header {
    font-size: .95rem;
    font-weight: 600;
    margin-bottom: .6rem;
    color: #444;
    display: flex;
    align-items: center;
    gap: .4rem;
}
/* ---------- SHIPPING ESTIMATOR ---------- */

.bt-shipping-estimator {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed #e5e7eb;
}
.bt-shipping-est-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13.12px;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    margin-bottom: 0.5rem;
    color: var(--text-main, #111827);
}
.bt-shipping-est-header:hover {
    color: var(--barik-700, #7c0f0f);
}
.bt-shipping-est-arrow {
    font-size: 14px;
    transition: transform 200ms ease;
    color: var(--text-muted, #6b7280);
}
.bt-shipping-est-body {
    display: flex !important;
    flex-direction: column;
    gap: 0.55rem;
}
.bt-shipping-est-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.bt-shipping-select-country, .bt-shipping-select-zone {
    width: 100%;
    appearance: auto;
    background: #f9fafb;
}
.bt-shipping-quotes {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.3rem;
}
.bt-shipping-method-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.bt-shipping-method-title {
    font-size: 12.48px;
    font-weight: 600;
    color: var(--text-muted, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.1rem;
}
.bt-shipping-quote-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.65rem;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    cursor: pointer;
    font-size: 13.6px;
    transition: border-color 150ms ease, background 150ms ease;
}
.bt-shipping-quote-row:hover {
    border-color: var(--barik-400, #e88080);
    background: #fff5f5;
}
.bt-shipping-quote-row input[type="radio"] {
    accent-color: var(--barik-600, #a11414);
    flex-shrink: 0;
}
.bt-shipping-quote-label {
    flex: 1 1 auto;
    color: var(--text-main, #111827);
}
.bt-shipping-quote-price {
    font-weight: 600;
    color: var(--barik-700, #7c0f0f);
    white-space: nowrap;
}
.bt-shipping-est-msg {
    font-size: 12.48px;
    min-height: 16px;
}
.bt-shipping-est-msg.error {
    color: #b91c1c;
}
.bt-shipping-est-msg.success {
    color: #16a34a;
}
/* ---------- SHIPPING QUOTE BUTTON SPINNER ---------- */

.bt-quote-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(249, 250, 251, 0.4);
    border-top-color: #f9fafb;
    border-radius: 50%;
    animation: bt-spin 0.65s linear infinite;
    vertical-align: middle;
    margin-right: 2px;
}
@keyframes bt-spin {
    to {
        transform: rotate(360deg);
    }
}
/* ---------- QTY STOCK ERROR ---------- */

.bt-qty-error {
    display: none;
    font-size: 12px;
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 5px 10px;
    margin-bottom: 6px;
    animation: bt-shake 0.3s ease;
}
.bt-qty-error.show {
    display: block;
}
.bt-item-stock-error {
    border-color: #fca5a5 !important;
    background: #fff8f8 !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.12) !important;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}
@keyframes bt-shake {
    0% {
        transform: translateX(0);
    }
    20% {
        transform: translateX(-4px);
    }
    40% {
        transform: translateX(4px);
    }
    60% {
        transform: translateX(-3px);
    }
    80% {
        transform: translateX(2px);
    }
    100% {
        transform: translateX(0);
    }
}
/* ---------- GLOBAL STOCK ERROR BANNER ---------- */

.bt-stock-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    margin-bottom: 16px;
    border-radius: 10px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 13.5px;
    line-height: 1.5;
    animation: bt-fadein 0.2s ease;
}
.bt-stock-banner-icon {
    flex-shrink: 0;
    font-size: 15px;
    margin-top: 1px;
}
.bt-stock-banner span:nth-child(2) {
    flex: 1;
}
.bt-stock-banner-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: #b91c1c;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
    opacity: 0.6;
    transition: opacity 150ms ease;
}
.bt-stock-banner-close:hover {
    opacity: 1;
}
/* *** marker on product name */

.bt-stock-marker {
    color: var(--barik-700, #7c0f0f);
    font-weight: 700;
    font-size: 0.85em;
    letter-spacing: 0.05em;
}
@keyframes bt-fadein {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/*Overides*/

span.bt-shipping-quote-label span {
    font-weight: normal;
}
.bt-shipping-quote-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.bt-shipping-quote-row input[type="radio"] {
    flex-shrink: 0;
}
.bt-shipping-quote-label {
    flex: 1;
    min-width: 0;
    /* prevent overflow */
}
.bt-shipping-quote-price {
    flex-basis: 100%;
    /* force to new row */
    text-align: right;
    /* atau left, sesuai selera */
}
span#custom-shipping-consolidated-title span, span#custom-shipping-direct-title span {
    color: #323232 !important;
    background-color: #FFF5CC;
    margin-top: 8px;
    padding: 8px 10px;
    border-left: 3px solid #EF9F27;
    border-radius: 0 4px 4px 0;
    font-size: 12px;
    line-height: 1.5;
    display: block;
}
.bt-qty-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.bt-unit-price {
    font-size: 12.8px;
    color: var(--text-muted);
    white-space: nowrap;
}
/* ---------- META + BOTTOM SIDE BY SIDE ---------- */

.bt-cart-item-main {
    gap: 4px;
}
.bt-cart-item-lower {
    display: block;
    gap: 12px;
    margin-top: 4px;
}
.bt-cart-item-lower .bt-cart-item-meta {
    flex: 0 0 auto;
    align-items: center;
    margin: 0;
    padding-top: 2px;
}
.bt-cart-item-lower .bt-cart-item-bottom {
    flex: 1 1 auto;
    margin-top: 0;
}
/* Out-of-stock item highlight */

.bt-cart-item.is-out-of-stock {
    border: 1.5px solid #7c0f0f;
    border-radius: 12px;
}
/* Out-of-stock item highlight */

.bt-cart-item.is-out-of-stock {
    border: 1.5px solid #7c0f0f;
    border-radius: 12px;
}