:root {
    --msc-primary: #0f4cff;
    --msc-text: #17191f;
    --msc-muted: #777d88;
    --msc-border: #e6e9ef;
    --msc-soft: #f7f8fb;
    --msc-max-width: 760px;
}

body.msc-cart-active .woocommerce-notices-wrapper,
body.msc-cart-active .woocommerce-message,
body.msc-cart-active .woocommerce-error,
body.msc-cart-active .woocommerce-info {
    max-width: var(--msc-max-width);
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.msc-cart-shell,
.msc-cart-shell * {
    box-sizing: border-box;
}

.msc-cart-shell {
    width: 100%;
    max-width: var(--msc-max-width);
    margin: 28px auto 54px;
    color: var(--msc-text);
    font-family: inherit;
    padding: 0 16px;
}

.msc-cart-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--msc-border);
    border-radius: 24px;
    box-shadow: 0 18px 60px rgba(22, 28, 45, .07);
}

.msc-cart-shell .msc-steps {
    display: grid;
    grid-template-columns: 1fr minmax(32px, 72px) 1fr minmax(32px, 72px) 1fr;
    align-items: center;
    gap: 5px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--msc-border);
}

.msc-cart-shell .msc-step {
    appearance: none;
    border: 0;
    padding: 6px 2px;
    background: transparent;
    color: #9297a1;
    text-decoration: none !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 0;
    font-size: 12px;
    line-height: 1.6;
}

.msc-cart-shell a.msc-step:hover {
    color: var(--msc-primary);
}

.msc-cart-shell .msc-step-icon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
}

.msc-cart-shell .msc-step-icon svg {
    width: 24px;
    height: 24px;
}

.msc-cart-shell .msc-step.is-active {
    color: var(--msc-text);
    font-weight: 800;
}

.msc-cart-shell .msc-step.is-active .msc-step-icon {
    color: var(--msc-primary);
}

.msc-cart-shell .msc-step-line {
    height: 1px;
    border-top: 1px dashed #c9cdd5;
}

.msc-cart-panel {
    padding: 24px;
}

.msc-cart-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 20px;
}

.msc-cart-heading small {
    display: block;
    margin-bottom: 2px;
    color: var(--msc-muted);
    font-size: 11px;
}

.msc-cart-heading h1 {
    margin: 0;
    font-size: 20px;
    line-height: 1.5;
    color: var(--msc-text);
}

.msc-cart-count {
    flex: 0 0 auto;
    padding: 7px 11px;
    border-radius: 999px;
    background: var(--msc-soft);
    color: var(--msc-muted);
    font-size: 12px;
}

.msc-cart-form {
    margin: 0 !important;
}

.msc-cart-items {
    display: grid;
    gap: 12px;
}

.msc-cart-item {
    position: relative;
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 15px;
    padding: 14px;
    border: 1px solid var(--msc-border);
    border-radius: 18px;
    background: #fff;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.msc-cart-item:hover {
    border-color: #d9dde5;
    box-shadow: 0 12px 30px rgba(20, 27, 45, .055);
    transform: translateY(-1px);
}

.msc-cart-item-thumb,
.msc-cart-item-thumb a {
    display: block;
}

.msc-cart-item-thumb img {
    display: block;
    width: 92px !important;
    height: 92px !important;
    max-width: 92px !important;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid #eef0f3;
    background: #fafafa;
}

.msc-cart-item-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 13px;
}

.msc-cart-item-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.msc-cart-item-title {
    margin: 0;
    padding: 0;
    font-size: 14px;
    line-height: 1.85;
    font-weight: 800;
}

.msc-cart-item-title a {
    color: inherit;
    text-decoration: none !important;
}

.msc-cart-item-meta,
.msc-cart-item-meta dl,
.msc-cart-item-meta p {
    margin: 3px 0 0;
    color: var(--msc-muted);
    font-size: 11px;
    line-height: 1.75;
}

.msc-cart-item-meta dl {
    display: flex;
    flex-wrap: wrap;
    gap: 3px 10px;
}

.msc-cart-item-meta dt,
.msc-cart-item-meta dd {
    margin: 0;
}

.msc-cart-remove {
    display: grid !important;
    place-items: center;
    flex: 0 0 34px;
    width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 !important;
    border: 1px solid #edf0f3 !important;
    border-radius: 10px !important;
    background: #fafbfc !important;
    color: #8d929b !important;
    font-size: 23px !important;
    line-height: 1 !important;
    text-decoration: none !important;
}

.msc-cart-remove:hover {
    background: #fff3f2 !important;
    border-color: #ffd9d4 !important;
    color: #d93e32 !important;
}

.msc-cart-item-bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
}

.msc-cart-quantity-wrap {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--msc-muted);
    font-size: 11px;
}

.msc-cart-qty-control {
    display: inline-flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid #dfe3ea;
    border-radius: 11px;
    background: #fff;
}

.msc-cart-qty-control .quantity {
    margin: 0 !important;
    padding: 0 !important;
}

.msc-cart-qty-control .qty {
    width: 48px !important;
    height: 38px !important;
    min-height: 38px !important;
    margin: 0 !important;
    padding: 0 4px !important;
    border: 0 !important;
    border-left: 1px solid #edf0f3 !important;
    border-right: 1px solid #edf0f3 !important;
    border-radius: 0 !important;
    background: #fff !important;
    color: var(--msc-text) !important;
    box-shadow: none !important;
    text-align: center !important;
    direction: ltr;
    font-weight: 800;
    -moz-appearance: textfield;
}

.msc-cart-qty-control .qty::-webkit-inner-spin-button,
.msc-cart-qty-control .qty::-webkit-outer-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.msc-qty-button {
    appearance: none;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
    border: 0;
    background: #fff;
    color: #3d424b;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.msc-qty-button:hover:not(:disabled) {
    color: var(--msc-primary);
    background: #f6f8ff;
}

.msc-qty-button:disabled {
    cursor: not-allowed;
    opacity: .35;
}

.msc-cart-item-price {
    text-align: left;
}

.msc-cart-item-price small {
    display: block;
    margin-bottom: 2px;
    color: var(--msc-muted);
    font-size: 10px;
}

.msc-cart-item-price strong {
    display: block;
    color: var(--msc-text);
    font-size: 13px;
    white-space: nowrap;
}

.msc-cart-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 15px;
    padding: 14px;
    border: 1px solid var(--msc-border);
    border-radius: 16px;
    background: #fafbfc;
}

.msc-cart-coupon {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1 1 420px;
}

.msc-cart-coupon #coupon_code {
    width: 100% !important;
    max-width: 330px;
    height: 42px !important;
    min-height: 42px !important;
    margin: 0 !important;
    padding: 0 12px !important;
    border: 1px solid #dfe3e9 !important;
    border-radius: 10px !important;
    background: #fff !important;
    box-shadow: none !important;
}

.msc-cart-action-button,
.msc-cart-update,
.msc-cart-proceed .checkout-button {
    min-height: 42px !important;
    margin: 0 !important;
    padding: 0 16px !important;
    border: 0 !important;
    border-radius: 11px !important;
    box-shadow: none !important;
    text-decoration: none !important;
    cursor: pointer;
    font-family: inherit !important;
    font-size: 12px !important;
    font-weight: 800 !important;
}

.msc-cart-action-button,
.msc-cart-update {
    background: #242831 !important;
    color: #fff !important;
}

.msc-cart-update {
    flex: 0 0 auto;
}

.msc-cart-action-button:hover,
.msc-cart-update:hover {
    opacity: .88;
}

.msc-cart-is-updating {
    pointer-events: none;
    opacity: .58;
}

.msc-cart-collaterals {
    margin-top: 18px;
}

.msc-cart-collaterals::after,
.msc-cart-collaterals::before {
    display: none !important;
}

.msc-cart-collaterals .cart_totals {
    float: none !important;
    width: 100% !important;
}

.msc-cart-summary-card {
    overflow: hidden;
    border: 1px solid var(--msc-border);
    border-radius: 18px;
    background: #fff;
}

.msc-cart-summary-card > h2 {
    margin: 0 !important;
    padding: 16px 18px !important;
    border-bottom: 1px solid var(--msc-border);
    color: var(--msc-text) !important;
    font-size: 15px !important;
    line-height: 1.6 !important;
}

.msc-cart-summary-card table.shop_table {
    width: 100% !important;
    margin: 0 !important;
    border: 0 !important;
    border-collapse: collapse !important;
    border-radius: 0 !important;
    background: #fff !important;
}

.msc-cart-summary-card table.shop_table tr {
    border: 0 !important;
    border-bottom: 1px solid #eef0f3 !important;
}

.msc-cart-summary-card table.shop_table tr:last-child {
    border-bottom: 0 !important;
}

.msc-cart-summary-card table.shop_table th,
.msc-cart-summary-card table.shop_table td {
    padding: 13px 18px !important;
    border: 0 !important;
    background: transparent !important;
    color: #4f5561 !important;
    font-size: 12px !important;
    line-height: 1.8 !important;
    vertical-align: top !important;
}

.msc-cart-summary-card table.shop_table td {
    text-align: left !important;
}

.msc-cart-summary-card table.shop_table .order-total th,
.msc-cart-summary-card table.shop_table .order-total td {
    padding-top: 16px !important;
    padding-bottom: 16px !important;
    background: #f6f8ff !important;
    color: var(--msc-text) !important;
    font-size: 14px !important;
    font-weight: 900 !important;
}

.msc-cart-summary-card .msc-cart-shipping-deferred td {
    color: #777d88 !important;
    font-size: 11px !important;
}

.msc-cart-proceed {
    margin-top: 12px !important;
    padding: 0 !important;
}

.msc-cart-proceed .checkout-button {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    min-height: 50px !important;
    background: var(--msc-primary) !important;
    color: #fff !important;
    font-size: 14px !important;
}

.msc-cart-proceed .checkout-button::after {
    content: " ←";
    margin-right: 7px;
}

.msc-cart-collaterals .cross-sells {
    margin-top: 22px;
}

@media (max-width: 640px) {
    .msc-cart-shell {
        margin: 0 auto 32px;
        max-width: none;
    }

    .msc-cart-card {
        border-left: 0;
        border-right: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .msc-cart-shell .msc-steps {
        grid-template-columns: 1fr minmax(18px, 42px) 1fr minmax(18px, 42px) 1fr;
        padding: 14px 12px;
    }

    .msc-cart-shell .msc-step {
        font-size: 10px;
    }

    .msc-cart-panel {
        padding: 16px 14px 22px;
    }

    .msc-cart-item {
        grid-template-columns: 78px 1fr;
        gap: 11px;
        padding: 11px;
    }

    .msc-cart-item-thumb img {
        width: 78px !important;
        height: 78px !important;
        max-width: 78px !important;
    }

    .msc-cart-item-title {
        font-size: 12px;
    }

    .msc-cart-item-bottom {
        align-items: center;
    }

    .msc-cart-quantity-wrap > span,
    .msc-cart-item-price small {
        display: none;
    }

    .msc-cart-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .msc-cart-coupon {
        flex: 1 1 auto;
        width: 100%;
    }

    .msc-cart-coupon #coupon_code {
        max-width: none;
    }

    .msc-cart-update {
        width: 100%;
    }
}

@media (max-width: 420px) {
    .msc-cart-heading h1 { font-size: 18px; }
    .msc-cart-item { grid-template-columns: 68px 1fr; }
    .msc-cart-item-thumb img {
        width: 68px !important;
        height: 68px !important;
        max-width: 68px !important;
    }
    .msc-cart-item-bottom { flex-wrap: wrap; }
    .msc-cart-coupon { flex-direction: column; }
    .msc-cart-coupon #coupon_code,
    .msc-cart-action-button { width: 100% !important; max-width: none; }
    .msc-cart-summary-card table.shop_table th,
    .msc-cart-summary-card table.shop_table td { padding-inline: 12px !important; }
}

@media (prefers-reduced-motion: reduce) {
    .msc-cart-item { transition: none; }
}

.msc-cart-totals {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.msc-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    padding: 16px;

    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.msc-total-label {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
}

.msc-total-value {
    flex-shrink: 0;
    text-align: left;
    font-size: 14px;
}

.msc-cart-shipping-deferred .msc-total-value {
    max-width: 65%;
    font-size: 12px;
    line-height: 1.8;
    opacity: 0.7;
}

.msc-total-row.order-total {
    margin-top: 4px;
    border-bottom: 0;
    font-size: 16px;
    font-weight: 700;
}

.msc-total-row.order-total .msc-total-label,
.msc-total-row.order-total .msc-total-value {
    font-size: 16px;
    font-weight: 700;
}

@media (max-width: 600px) {
    .msc-total-row {
        gap: 12px;
    }

    .msc-cart-shipping-deferred {
        align-items: flex-start;
    }

    .msc-cart-shipping-deferred .msc-total-value {
        max-width: 60%;
    }
}

@media (max-width: 640px) {
    .msc-cart-shell {
        padding: 0;
    }
}

/* v1.4.5 — product and aggregate discount presentation */
.msc-cart-price-before {
    display: block;
    margin-bottom: 2px;
    color: var(--msc-muted);
    font-size: 11px;
    font-weight: 500;
    text-decoration-thickness: 1px;
    white-space: nowrap;
}

.msc-cart-item-discount {
    display: inline-flex;
    align-items: center;
    margin-top: 5px;
    padding: 3px 7px;
    border-radius: 999px;
    background: #effaf3;
    color: #168244;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.msc-total-row.msc-discount-total .msc-total-label,
.msc-total-row.msc-discount-total .msc-total-value,
.msc-total-row .msc-discount-amount {
    color: #168244;
    font-weight: 700;
}
