/* ============================================================
   Cart page redesign (v2) — /Home/Cart
   Loaded after the global stylesheets so v2 wins.
   Page title + underline tabs, a green 3-step progress bar,
   a 2-column grid of compact horizontal product cards, and the
   order-summary panel. Bootstrap-first; custom CSS only for the
   card frame (repeated component), badge ribbons and states.
   ============================================================ */

.cart-v2 {
    color: var(--zino-text);
}

/* --- Page title ------------------------------------------------------ */
.cart-v2-title {
    color: var(--zino-text);
    font-weight: 700;
    font-size: clamp(1.125rem, 1.04rem + 0.38vw, 1.375rem); /* 18 -> 22px */
}

    .cart-v2-title .bi {
        color: var(--zino-text);
        font-size: 1.2em;
    }

/* --- Tabs (restyle Bootstrap nav-tabs into underline tabs) ----------- */
.cart-tabs.nav-tabs {
    border-bottom: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    margin-bottom: var(--space-8); /* gap before tab content / stepper */
}

    .cart-tabs.nav-tabs::-webkit-scrollbar {
        display: none;
    }

/* thin divider on the inline-end of every tab but the last */
.cart-tabs .nav-item:not(:last-child) {
    border-inline-end: 2px solid var(--zino-border);
}

.cart-tabs .nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

    /* tab icons are a fixed 32×32 (Figma), independent of the label size */
    .cart-tabs .nav-link .zi {
        width: 32px;
        height: 32px;
        aspect-ratio: 1 / 1;
    }

.cart-tabs .nav-link {
    white-space: nowrap;
    border: 0;
    border-bottom: 2px solid transparent; /* space for the active underline */
    border-radius: 0;
    background: none;
    color: var(--zino-text);
    font-weight: 400;
    font-size: clamp(0.875rem, 0.83rem + 0.19vw, 1rem); /* 14 -> 16px */
}

    .cart-tabs .nav-link:hover,
    .cart-tabs .nav-link:hover .bi,
    .cart-tabs .nav-link:hover .zi {
        color: var(--zino-green);
    }

    .cart-tabs .nav-link.active {
        background: none;
        color: var(--zino-green);
        font-weight: 700;
    }

        /* explicit colour on the SVG so the icon follows the tab state
           (the icon strokes use currentColor) */
        .cart-tabs .nav-link.active .bi,
        .cart-tabs .nav-link.active .zi {
            color: var(--zino-green);
        }

        /* green underline indicator under the active tab */
        .cart-tabs .nav-link.active::after {
            content: "";
            position: absolute;
            inset-inline: var(--space-3);
            bottom: -1px;
            height: 3px;
            border-radius: 3px 3px 0 0;
            background: var(--zino-green);
        }

/* --- Checkout progress stepper (green + rounded-square markers) ------
   Overrides the legacy blue/red .line-step styling from style2.css, scoped
   to the cart page so other steppers keep their own look. */
.cart-v2 .line-step::before {
    background: var(--zino-border); /* light-gray track */
}

/* filled progress segment + the active step marker -> green */
.cart-v2 .line-step-box.complete::before {
    background-color: var(--zino-green);
}

.cart-v2 .line-step-box.complete .icon {
    background: var(--zino-green-light);
    color: var(--zino-text);
}

/* rounded squares instead of circles, flat (no shadow) */
.cart-v2 .line-step-box .icon {
    width: 32px;
    height: 32px;
    line-height: 32px;
    border-radius: 0;
    font-size: 1rem;
    box-shadow: none !important;
}

/* upcoming steps: pale-green tint + muted number */
.cart-v2 .line-step-box.disabled .icon,
.cart-v2 .line-step-box.disabled .icon i {
    background: var(--zino-green-light);
    color: var(--zino-text);
}

.cart-v2 .line-step-box.disabled p {
    color: var(--zino-text);
}

/* labels sit BELOW the number squares (Figma); the square stays centered
   on the track line, the label is pulled out of flow underneath it */
.cart-v2 .line-step-container {
    overflow: visible; /* don't clip the labels that hang below the line */
    margin-bottom: var(--space-6); /* reserve room for the labels */
}

/* Cart tabs: extra gap before AJAX-loaded stepper */
.cart-v2 .tab-content .line-step-container {
    margin-top: var(--space-6);
}

/* Factor / FinalizeFactor: stepper stands alone (not inside tabs) */
.cart-v2 > .line-step-container,
.cart-v2 .container-fluid > .line-step-container {
    margin-top: var(--space-6);
    margin-bottom: var(--space-10);
}

.cart-v2 .line-step-box {
    overflow: visible;
}

    .cart-v2 .line-step-box .icon {
        margin: 0 auto; /* reset the legacy 60px; square sits on the line */
    }

    .cart-v2 .line-step-box p {
        position: absolute;
        top: calc(100% + var(--space-2)); /* just under the square */
        inset-inline: 0;
        margin: 0;
        font-size: 0.875rem; /* 14px */
        color: var(--zino-text);
    }

/* --- Header action buttons (above the product grid) ------------------ */
.cart-v2 .cart-bulk-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    border-radius: 0;
    font-size: 0.8125rem; /* 13px */
    line-height: 1.4;
    padding: var(--space-2) var(--space-4);
}

/* slanted (trapezoid) green fill, same shape/token as .zino-pill-btn —
   shared by the "transfer all" header button and the "ثبت سفارش" CTA */
.cart-v2 .cart-bulk-btn--save,
.cart-v2 .cart-submit-btn {
    position: relative;
    isolation: isolate;
    z-index: 0;
    border: none;
    background: transparent;
    color: #fff;
    overflow: hidden;
}

    .cart-v2 .cart-bulk-btn--save::before,
    .cart-v2 .cart-submit-btn::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: -1;
        background: var(--zino-green);
        clip-path: polygon(10px 0, 100% 0, 100% 100%, 0 100%);
        transition: background 0.2s ease;
    }

    .cart-v2 .cart-bulk-btn--save:hover,
    .cart-v2 .cart-submit-btn:hover {
        color: #fff;
    }

        .cart-v2 .cart-bulk-btn--save:hover::before,
        .cart-v2 .cart-submit-btn:hover::before {
            background: var(--zino-green-hover);
        }

    .cart-v2 .cart-bulk-btn--save .zi {
        font-size: 1.25rem;
    }

.cart-v2 .cart-bulk-btn--clear {
    border: 1px solid var(--zino-warn-border);
    background: var(--zino-warn-bg);
    color: var(--zino-warn);
}

    .cart-v2 .cart-bulk-btn--clear:hover {
        background: var(--zino-warn);
        color: #fff;
    }

/* phones: smaller label so both bulk buttons fit side by side */
@media (max-width: 575.98px) {
    .cart-v2 .cart-bulk-btn {
        font-size: 0.65rem; /* ~10.4px */
    }
}

/* --- Compact horizontal product card --------------------------------- */
.cart-card-v2 {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: var(--space-3);
    height: 100%;
    padding: var(--space-3);
    border: 1px solid var(--zino-border-strong);
    border-radius: 0;
    background: #fff;
    transition: box-shadow 0.2s ease;
}

    .cart-card-v2:hover {
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    }

    /* image on the inline-end (right in RTL) */
    .cart-card-v2 .cc-image {
        flex: 0 0 64px;
        display: flex;
        align-items: center;
        justify-content: center;
        order: 1; /* RTL: lowest order sits on the right -> image on the right */
    }

        .cart-card-v2 .cc-image img {
            max-width: 64px;
            max-height: 60px;
            width: auto;
            height: auto;
            object-fit: contain;
        }

    /* body: title, meta, price.
       basis 0 (not auto) so the long price line can't push the body onto its
       own wrapped row beside the image on phones */
    .cart-card-v2 .cc-body {
        order: 2;
        flex: 1 1 0;
        min-width: 0;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        gap: var(--space-1);
    }

    .cart-card-v2 .cc-title-link {
        color: inherit;
    }

    .cart-card-v2 .cc-title {
        margin: 0;
        font-weight: 700;
        font-size: 0.8125rem; /* 13px */
        line-height: 1.5;
        color: var(--zino-text);
    }

    .cart-card-v2 .cc-meta {
        display: flex;
        flex-wrap: wrap;
        gap: var(--space-1) var(--space-3);
        color: var(--zino-text-sub);
        font-size: 0.6875rem; /* 11px */
    }

        .cart-card-v2 .cc-meta .bi {
            margin-inline-end: 2px;
            opacity: 0.7;
        }

        .cart-card-v2 .cc-meta b {
            font-weight: 700;
            color: var(--zino-text);
        }

    .cart-card-v2 .cc-price {
        margin: 0;
        color: var(--zino-text);
        font-size: 0.6875rem; /* 11px */
        line-height: 1.6;
    }

        .cart-card-v2 .cc-price .cc-cur {
            color: var(--zino-text-sub);
            font-size: 0.625rem;
        }

        .cart-card-v2 .cc-price .cc-total {
            font-weight: 700;
        }

        .cart-card-v2 .cc-price .cc-unit-conv {
            display: block;
            color: var(--zino-text-sub);
        }

    /* aside action strip on the inline-start (left in RTL):
       badge (top) -> icons -> save button, stacked */
    .cart-card-v2 .cc-aside {
        order: 3; /* RTL: highest order sits on the left -> action strip on the left */
        flex: 0 0 auto;
        min-width: 80px; /* Figma strip width */
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        justify-content: space-between;
        gap: var(--space-2);
    }

    .cart-card-v2 .cc-labels {
        display: flex;
        flex-direction: column;
        align-items: flex-end; /* RTL: badges hug the left edge of the strip */
        gap: var(--space-1);
    }

    .cart-card-v2 .cc-icons {
        display: flex;
        align-items: center;
        gap: var(--space-2);
    }

    .cart-card-v2 .cc-icon-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 22px;
        height: 22px;
        color: var(--zino-text-sub);
        font-size: 0.9375rem;
        cursor: pointer;
        transition: color 0.15s ease;
    }

        .cart-card-v2 .cc-icon-btn.cc-del:hover {
            color: var(--zino-warn);
        }

        .cart-card-v2 .cc-icon-btn.cc-edit:hover {
            color: var(--zino-green);
        }

    .cart-card-v2 .cc-save-btn {
        align-self: stretch;
        border: 1px solid var(--zino-green);
        border-radius: 0;
        background: transparent;
        color: var(--zino-green);
        font-size: 0.625rem; /* 10px */
        font-weight: 600;
        line-height: 1.3;
        padding: 4px 6px;
        text-align: center; /* wraps instead of forcing the strip wide on narrow cards */
        transition: background 0.15s ease, color 0.15s ease;
        cursor: pointer;
    }

        .cart-card-v2 .cc-save-btn:hover {
            background: var(--zino-green);
            color: #fff;
        }

/* On phones: badge on its own row at the top, the action strip full-width
   below the body (image + details share the first row) */
@media (max-width: 575.98px) {
    .cart-card-v2 {
        flex-wrap: wrap;
    }

        .cart-card-v2 .cc-title {
            font-size: 0.75rem; /* 12px — slightly smaller on phones */
        }

        .cart-card-v2 .cc-aside {
            order: 4;
            flex-direction: row;
            align-items: center;
            justify-content: space-between;
            width: 100%;
            min-width: 0;
            padding-top: 0;
            gap: var(--space-3);
        }

            /* swap: icons take the right corner, badge sits beside them */
            .cart-card-v2 .cc-icons {
                order: -1;
            }
}

/* --- Order summary panel (سفارش شما) --------------------------------- */
/* neutralise the legacy white/shadow/rounded wrapper (style2.css
   .cart-canvases .item) so .factor is the only visible card */
.cart-v2 .cart-canvases .item {
    background-color: transparent;
    box-shadow: none;
    padding: 0;
    border-radius: 0;
    margin-bottom: 0;
}

/* Figma: the whole panel is a flat light-gray card (no border) */
.cart-v2 .cart-canvases .factor {
    border: none;
    padding: var(--space-4);
    background: var(--zino-surface);
}

/* header */
.cart-v2 .cart-canvases .factor .title {
    margin-bottom: var(--space-3);
}

    .cart-v2 .cart-canvases .factor .title h6 {
        color: var(--zino-text);
        font-weight: 700;
        font-size: 1.0625rem; /* 17px */
    }

    .cart-v2 .cart-canvases .factor .title .zi {
        font-size: 1.25rem;
    }

/* generic label / value rows (مانده حساب، کیف پول، …) */
.cart-v2 .summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    margin: 0;
    padding: var(--space-3) 0;
    font-size: 0.8125rem; /* 13px */
    border-bottom: 1px solid var(--zino-border-strong);
}

    .cart-v2 .summary-row p {
        margin: 0;
    }

.cart-v2 .summary-amount {
    white-space: nowrap;
    font-weight: 700;
}

.cart-v2 .summary-cur {
    color: var(--zino-text-sub);
    font-size: 0.6875rem; /* 11px */
    font-weight: 400;
}

/* total-cart row at the top */
.cart-v2 .summary-row--head {
    border-bottom: none;
    padding-top: 0;
    font-weight: 700;
}

/* final amount, just above the CTA */
.cart-v2 .summary-row--final {
    border-bottom: none;
    border-top: 1px solid var(--zino-border-strong);
    margin-top: var(--space-2);
    font-weight: 700;
    font-size: 1rem;
}

    .cart-v2 .summary-row--final .summary-amount {
        color: var(--zino-text);
    }

/* discount code (input + green اعمال) */
.cart-v2 .discount-code-section {
    margin: var(--space-3) 0;
}

    .cart-v2 .discount-code-section .form-control {
        border-radius: 0;
        border-color: var(--zino-green-light);
        font-size: 0.8125rem;
    }

        .cart-v2 .discount-code-section .form-control:focus {
            border-color: var(--zino-green);
            box-shadow: none;
        }

    .cart-v2 .discount-code-section .btn {
        border: none;
        border-radius: 0;
        background: var(--zino-green);
        color: #fff;
        white-space: nowrap;
    }

        .cart-v2 .discount-code-section .btn:hover {
            background: var(--zino-green-hover);
        }

/* green primary CTA: inline (sized to its text), not full-width */
.cart-v2 .cart-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    font-weight: 700;
    padding: 7px 25px;
    cursor: pointer;
}

/* --- Settlement-status breakdown (وضعیت تسویه) ------------------------
   Shared by the cart summary and the Factor page, so kept unscoped (the
   class names are unique). Moved here from the partial's inline <style>. */
.cart-settlement-mini {
    font-size: 0.8125rem; /* 13px */
    border: none;
    background: var(--zino-surface-2);
    padding: 10px 12px;
    margin-bottom: 10px;
}

.cart-settlement-mini-title {
    font-size: 0.875rem; /* 14px */
    font-weight: 600;
    color: var(--zino-text-sub);
    margin-bottom: 8px;
}

.cart-settlement-mini-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    line-height: 1.45;
    padding: 3px 0;
}

    .cart-settlement-mini-line + .cart-settlement-mini-line {
        margin-top: 6px;
    }

/* نقدی row: blue accent on label + amount */
.cart-settlement-mini-line-cash,
.cart-settlement-mini-line-cash .cart-settlement-mini-line-label,
.cart-settlement-mini-line-cash .cart-settlement-mini-line-amount {
    color: var(--zino-cash);
}

.cart-settlement-mini-line-cash {
    background: transparent;
    border: none;
    padding: 6px 0;
    margin-bottom: 4px;
}

    .cart-settlement-mini-line-cash .cart-settlement-mini-line-label {
        display: inline-flex;
        align-items: center;
        gap: 4px;
    }

        .cart-settlement-mini-line-cash .cart-settlement-mini-line-label i {
            font-size: 0.875rem; /* 14px */
        }

    .cart-settlement-mini-line-cash .cart-settlement-mini-line-hint {
        color: var(--zino-text-sub);
    }

.cart-settlement-mini-line-label {
    color: var(--zino-text);
    font-weight: 600;
    flex: 0 0 auto;
    min-width: 5.5rem;
}

.cart-settlement-mini-line-hint {
    flex: 1 1 100%;
    font-size: 0.6875rem; /* 11px */
    font-weight: 400;
    color: var(--zino-text-sub);
    line-height: 1.4;
}

.cart-settlement-mini-line-amount {
    font-size: 0.875rem; /* 14px */
    font-weight: 700;
    color: var(--zino-text);
    direction: ltr;
    unicode-bidi: plaintext;
    flex: 1 1 auto;
    text-align: end;
}

.cart-settlement-mini-line-ras {
    font-size: 0.6875rem; /* 11px */
    font-weight: 600;
    color: var(--zino-warn);
    direction: ltr;
    unicode-bidi: plaintext;
    flex: 0 0 auto;
}

.cart-settlement-mini-chips {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cart-settlement-mini-credit-block {
    margin-top: 6px;
}

    .cart-settlement-mini-credit-block .cart-settlement-mini-chips + .cart-settlement-mini-line-total {
        margin-top: 8px;
    }

.cart-settlement-mini-line-total {
    background: var(--zino-surface);
    border: 1px solid var(--zino-border);
    padding: 7px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cart-settlement-mini-line-total-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    line-height: 1.45;
}

.cart-settlement-mini-line-total-ras {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 4px;
    border-top: 1px solid var(--zino-border-strong);
    line-height: 1.45;
}

.cart-settlement-mini-line-total-ras-label {
    color: var(--zino-text-sub);
    font-size: 0.6875rem; /* 11px */
    font-weight: 600;
    flex: 0 0 auto;
}

.cart-settlement-mini-line-total-ras-date {
    font-size: 0.875rem; /* 14px */
    font-weight: 600;
    color: var(--zino-warn);
    direction: ltr;
    unicode-bidi: plaintext;
    flex: 0 0 auto;
}

.cart-settlement-mini-line-total .cart-settlement-mini-line-amount {
    font-size: 0.8125rem; /* 13px */
}

.cart-settlement-mini-guide-note {
    margin-top: 6px;
    font-size: 0.625rem; /* 10px */
    font-weight: 500;
    color: var(--zino-text-sub);
    line-height: 1.4;
}

.cart-settlement-mini-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 10px;
    font-size: 0.75rem; /* 12px */
    font-weight: 600;
    background: var(--zino-surface); /* uniform light row; tone provides text colour only */
    border: 1px solid var(--zino-border);
    line-height: 1.4;
}

.cart-settlement-mini-chip-label {
    flex: 0 0 auto;
}

.cart-settlement-mini-chip-amount {
    font-size: 0.8125rem; /* 13px */
    font-weight: 700;
    direction: ltr;
    unicode-bidi: plaintext;
    text-align: end;
    flex: 1 1 auto;
}

.cart-settlement-mini-status {
    margin-top: 8px;
    padding: 6px 8px;
    font-size: 0.75rem; /* 12px */
    line-height: 1.45;
}

    .cart-settlement-mini-status.ok {
        background: var(--zino-green-light);
        color: var(--zino-green);
    }

    /* coral ribbon, same language as the .cc-labels / .pc-badge badges:
       light body, coral text, slanted edge + coral fold on the inline-end */
    .cart-settlement-mini-status.err {
        position: relative;
        overflow: hidden;
        background: var(--zino-warn-bg-soft);
        border: none;
        color: var(--zino-warn);
        font-size: 0.75rem; /* 12px */
        font-weight: 400;
        padding: 8px 18px 8px 10px;
        clip-path: polygon(0 8%, 30% 0, 100% 0, 100% 100%, 0 100%);
    }

        .cart-settlement-mini-status.err::after {
            content: "";
            position: absolute;
            inset-block: 0;
            right: 0;
            width: 6px;
            background: var(--zino-warn-border);
        }

/* full-width CTA on the Factor page (multiple invoice-type buttons) */
.cart-v2 .cart-submit-btn--block {
    display: flex;
    width: 100%;
}

/* wallet-charge alert inside the factor summary (coral ribbon + green CTA) */
.cart-v2 .factor-wallet-alert {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    margin-top: var(--space-4);
    margin-bottom: var(--space-4);
    padding: var(--space-4) var(--space-5) var(--space-4) var(--space-4);
    background: var(--zino-warn-bg-soft);
    border: none;
    color: var(--zino-warn);
    text-align: center;
    clip-path: polygon(0 6%, 18% 0, 100% 0, 100% 100%, 0 100%);
}

    .cart-v2 .factor-wallet-alert::after {
        content: "";
        position: absolute;
        inset-block: 0;
        right: 0;
        width: 6px;
        background: var(--zino-warn-border);
    }

.cart-v2 .factor-wallet-alert-msg {
    margin: 0;
    font-size: 0.8125rem; /* 13px */
    line-height: 1.65;
    font-weight: 400;
    color: var(--zino-warn);
}

.cart-v2 .factor-wallet-alert-amount {
    font-weight: 700;
    color: var(--zino-text);
}

.cart-v2 .factor-wallet-alert-cur {
    font-size: 0.6875rem; /* 11px */
    font-weight: 400;
    color: var(--zino-text-sub);
}

.cart-v2 a.cart-submit-btn {
    text-decoration: none;
}

/* Factor table — excel export (green trapezoid, same as bulk CTA) */
.cart-v2 .cart-export-btn {
    position: relative;
    isolation: isolate;
    z-index: 0;
    border: none;
    background: transparent;
    color: #fff;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    border-radius: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.4;
    padding: var(--space-2) var(--space-4);
    box-shadow: none !important;
}

    .cart-v2 .cart-export-btn::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: -1;
        background: var(--zino-green);
        clip-path: polygon(10px 0, 100% 0, 100% 100%, 0 100%);
        transition: background 0.2s ease;
    }

    .cart-v2 .cart-export-btn:hover,
    .cart-v2 .cart-export-btn:focus {
        color: #fff;
        background: transparent;
        box-shadow: none !important;
    }

        .cart-v2 .cart-export-btn:hover::before,
        .cart-v2 .cart-export-btn:focus::before {
            background: var(--zino-green-hover);
        }

/* settlement badges inside the factor table */
.cart-v2 #factor .pc-badge {
    vertical-align: middle;
}

/* Factor table — DataTables sizes to content by default; stretch full width */
.cart-v2 .checkout-content.default .dt-container,
.cart-v2 .checkout-content.default .dataTables_wrapper {
    width: 100%;
}

.cart-v2 #factor.dataTable,
.cart-v2 #factor {
    width: 100% !important;
    max-width: 100%;
    table-layout: fixed;
}

.cart-v2 #factor .factor-col-row {
    width: 2.75rem;
}

.cart-v2 #factor .factor-col-name {
    width: 38%;
}

.cart-v2 #factor .factor-col-qty,
.cart-v2 #factor .factor-col-unitprice,
.cart-v2 #factor .factor-col-total,
.cart-v2 #factor .factor-col-vat {
    width: 11%;
}

.cart-v2 #factor .factor-col-subqty,
.cart-v2 #factor .factor-col-unitcnt,
.cart-v2 #factor .factor-col-supply {
    width: 8%;
}

/* --- Factor page (جزئیات سفارش) — tablet -------------------------------- */
@media (max-width: 767.98px) {
    .cart-v2 .factor-summary-sticky {
        position: static !important;
        max-width: 22.5rem;
        margin-inline: auto;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .cart-v2 .factor-summary-sticky {
        top: var(--space-4);
        align-self: flex-start;
    }

    .cart-v2 #factor {
        font-size: 0.75rem;
    }

        .cart-v2 #factor th,
        .cart-v2 #factor td {
            padding: var(--space-2);
            vertical-align: middle;
        }

        .cart-v2 #factor .factor-col-name {
            white-space: normal;
            line-height: 1.45;
            width: 42%;
        }

        .cart-v2 #factor .pc-badge {
            display: inline-flex;
            margin-top: var(--space-1);
            white-space: normal;
        }
}

@media (max-width: 991.98px) {
    .cart-v2 .checkout-content.default {
        -webkit-overflow-scrolling: touch;
    }

    .cart-v2 #factor .factor-col-name {
        white-space: normal;
        line-height: 1.45;
    }
}

/* every settlement month uses the one existing coral token (no per-month colours) */
.settlement-tone-1,
.settlement-tone-2,
.settlement-tone-3,
.settlement-tone-4,
.settlement-tone-5,
.settlement-tone-6 {
    color: var(--zino-warn);
}

/* ============================================================
   Factor notice modals (CashProductExist, etc.)
   Green strip + v2 typography; lives outside .cart-v2 wrapper.
   ============================================================ */
.cv2-notice-modal .modal-content {
    border-top: 8px solid var(--zino-green);
    border-radius: 0;
}

.cv2-notice-modal .modal-header {
    border-bottom: 1px solid var(--zino-border);
    padding: var(--space-4) var(--space-5);
}

.cv2-notice-modal .modal-title {
    color: var(--zino-text);
    font-size: clamp(0.875rem, 0.5vw + 0.8125rem, 1rem);
    font-weight: 700;
}

.cv2-notice-modal .modal-body {
    padding: var(--space-4) var(--space-5);
}

.cv2-notice-modal .modal-footer {
    border-top: 1px solid var(--zino-border);
    padding: var(--space-4) var(--space-5);
    justify-content: space-between;
}

.cv2-notice-panel {
    padding: var(--space-4);
    background: var(--zino-warn-bg-soft);
    border: 1px solid var(--zino-warn-border);
    text-align: right;
}

.cv2-notice-greeting {
    color: var(--zino-warn);
    font-size: 0.875rem;
}

.cv2-notice-text {
    color: var(--zino-text);
    font-size: 0.8125rem;
    line-height: 1.75;
    text-align: justify;
}

.cv2-notice-modal .pc-badge {
    vertical-align: middle;
}

.cv2-notice-modal .cv2-notice-btn {
    position: relative;
    isolation: isolate;
    z-index: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    color: #fff;
    overflow: hidden;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.4;
    padding: var(--space-2) var(--space-5);
    box-shadow: none !important;
}

.cv2-notice-modal .cv2-notice-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--zino-green);
    clip-path: polygon(10px 0, 100% 0, 100% 100%, 0 100%);
    transition: background 0.2s ease;
}

.cv2-notice-modal .cv2-notice-btn:hover,
.cv2-notice-modal .cv2-notice-btn:focus {
    color: #fff;
}

.cv2-notice-modal .cv2-notice-btn:hover::before,
.cv2-notice-modal .cv2-notice-btn:focus::before {
    background: var(--zino-green-hover);
}

.cv2-notice-modal .cv2-notice-btn--outline {
    color: var(--zino-text);
    background: var(--zino-surface);
    border: 1px solid var(--zino-border-strong);
}

.cv2-notice-modal .cv2-notice-btn--outline::before {
    display: none;
}

.cv2-notice-modal .cv2-notice-btn--outline:hover,
.cv2-notice-modal .cv2-notice-btn--outline:focus {
    color: var(--zino-text);
    background: var(--zino-surface-2);
    border-color: var(--zino-border-strong);
}

