
    /* The view hides panels with the `hidden` attribute, and several of them
       are display:flex below — a class selector beats the browser's own
       [hidden]{display:none}, so it has to be said here. */
    .cart-page [hidden] { display: none !important; }

    .cart-page { max-width: 100%; }
    .cart-title { font-size: 1.5rem; margin: 0 0 1rem; font-weight: 700; }
    .cart-intro { opacity: .8; margin-bottom: 1rem; }

    .cart-state { padding: 2rem 1rem; text-align: center; opacity: .7; }

    .cart-empty {
        padding: 2.5rem 1rem;
        text-align: center;
        border: 1px dashed rgba(128, 128, 128, .3);
        border-radius: 12px;
    }

    .cart-empty p { margin: 0 0 1rem; opacity: .75; }

    .cart-layout { display: flex; gap: 2rem; align-items: flex-start; flex-wrap: wrap; }
    .cart-main { flex: 1; min-width: 300px; }
    .cart-aside { width: 320px; flex-shrink: 0; }

    .cart-warn {
        border-left: 3px solid #d29922;
        background: rgba(210, 153, 34, .07);
        border-radius: 0 6px 6px 0;
        padding: .6rem .9rem;
        margin-bottom: 1rem;
        font-size: .86rem;
    }

    .cart-lines { list-style: none; margin: 0; padding: 0; }

    .cart-line {
        display: flex;
        gap: 1rem;
        padding: 1rem 0;
        border-top: 1px solid rgba(128, 128, 128, .18);
        align-items: flex-start;
    }

    .cart-line:first-child { border-top: none; }

    .cart-line-img {
        width: 84px;
        height: 64px;
        flex-shrink: 0;
        border-radius: 8px;
        background: rgba(128, 128, 128, .12) center/cover no-repeat;
    }

    .cart-line-body { flex: 1; min-width: 0; }
    .cart-line-title { font-weight: 600; text-decoration: none; color: inherit; }
    .cart-line-title:hover { color: var(--accent-color, #0073aa); }
    .cart-line-store { font-size: .78rem; opacity: .6; margin-top: .1rem; }
    .cart-line-unit { font-size: .82rem; opacity: .75; margin-top: .35rem; }
    .cart-line-tag {
        display: inline-block;
        font-size: .68rem;
        padding: .05rem .45rem;
        border-radius: 4px;
        background: #dc3545;
        color: #fff;
        margin-left: .35rem;
    }

    .cart-line-side { text-align: right; flex-shrink: 0; }
    .cart-line-total { font-weight: 700; }

    .cart-stepper {
        display: inline-flex;
        align-items: center;
        border: 1px solid rgba(128, 128, 128, .3);
        border-radius: 8px;
        overflow: hidden;
        margin-top: .5rem;
    }

    .cart-step {
        width: 30px;
        height: 30px;
        border: none;
        background: transparent;
        color: inherit;
        font-size: 1.05rem;
        cursor: pointer;
    }

    .cart-step:hover { background: rgba(128, 128, 128, .12); }

    .cart-qty {
        width: 40px;
        text-align: center;
        border: none;
        border-left: 1px solid rgba(128, 128, 128, .3);
        border-right: 1px solid rgba(128, 128, 128, .3);
        background: transparent;
        color: inherit;
        font: inherit;
        height: 30px;
    }

    .cart-remove {
        display: block;
        margin: .5rem 0 0 auto;
        background: none;
        border: none;
        color: #f85149;
        cursor: pointer;
        font: inherit;
        font-size: .78rem;
        padding: .2rem .3rem;
        border-radius: 4px;
        opacity: .75;
    }

    .cart-remove:hover { opacity: 1; background: rgba(248, 81, 73, .1); }

    .cart-actions {
        display: flex;
        justify-content: space-between;
        gap: 1rem;
        flex-wrap: wrap;
        margin-top: 1.25rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(128, 128, 128, .18);
    }

    .cart-link {
        background: none;
        border: none;
        color: inherit;
        font: inherit;
        font-size: .85rem;
        cursor: pointer;
        opacity: .8;
        text-decoration: none;
        padding: 0;
    }

    .cart-link:hover { opacity: 1; }
    .cart-link--danger { color: #f85149; }

    .cart-summary {
        border: 1px solid rgba(128, 128, 128, .2);
        border-radius: 14px;
        padding: 1.25rem;
        background: var(--bg-card, transparent);
        position: sticky;
        top: 1rem;
    }

    .cart-summary-title { font-size: 1rem; margin: 0 0 .85rem; }

    .cart-totals { margin: 0 0 1rem; }

    .cart-total-row {
        display: flex;
        justify-content: space-between;
        gap: 1rem;
        font-size: .88rem;
        padding: .3rem 0;
    }

    .cart-total-row dt { opacity: .7; margin: 0; }
    .cart-total-row dd { margin: 0; }

    .cart-total-row--grand {
        border-top: 1px solid rgba(128, 128, 128, .2);
        margin-top: .4rem;
        padding-top: .6rem;
        font-size: 1.1rem;
        font-weight: 800;
    }

    .cart-total-row--grand dt { opacity: 1; }
    .cart-good { color: #2ea043; }

    .cart-field { display: block; margin-top: .85rem; font-size: .85rem; }

    .cart-field select,
    .cart-field input {
        width: 100%;
        margin-top: .3rem;
        padding: .5rem;
        border-radius: 8px;
        border: 1px solid rgba(128, 128, 128, .3);
        background: transparent;
        color: inherit;
        font: inherit;
        box-sizing: border-box;
    }

    .cart-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: .5rem;
        width: 100%;
        margin-top: 1rem;
        padding: .7rem;
        border: none;
        border-radius: 9px;
        background: #1d475a;
        color: #fff;
        font-weight: 700;
        cursor: pointer;
        text-decoration: none;
        font-size: .92rem;
    }

    .cart-btn:hover:not(:disabled) { background: #153a4a; color: #fff; }
    .cart-btn:disabled { opacity: .6; cursor: default; }

    .cart-btn--ghost {
        background: transparent;
        border: 1px solid rgba(128, 128, 128, .3);
        color: inherit;
        display: inline-flex;
        width: auto;
        padding: .55rem 1.1rem;
    }

    .cart-btn--ghost:hover { background: rgba(128, 128, 128, .1); color: inherit; }

    .cart-note { margin-top: .75rem; font-size: .82rem; opacity: .78; line-height: 1.5; }

    .cart-result {
        margin-top: .85rem;
        padding: .75rem;
        border-radius: 9px;
        font-size: .86rem;
        display: none;
        line-height: 1.5;
    }

    .cart-result.show { display: block; }
    .cart-result.ok { background: rgba(46, 160, 67, .12); }
    .cart-result.err { background: rgba(248, 81, 73, .12); }
    .cart-result a { color: inherit; font-weight: 600; }

    @media (max-width: 900px) {
        .cart-layout { flex-direction: column; }
        .cart-aside { width: 100%; }
        .cart-summary { position: static; }
    }
