        :root { --accent: #2f6b34; --accent-dark: #24522a; --teal: #0f766e; --line: #ece5d8; --ink: #2f2a24; --muted: #7a7266; }
        * { box-sizing: border-box; }
        body { background: linear-gradient(180deg,#fdfbf6 0%,#f6f1e8 34%,#f6f1e8 100%); color: var(--ink); }
        a { text-decoration: none; }

        /* ---- Topbar ---- */
        .ct-topbar { background: rgba(255,255,255,.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
        .ct-topbar-inner { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; gap: 1rem; padding: .85rem 1rem; }
        .ct-brand { font-size: 1.4rem; font-weight: 900; color: var(--accent); letter-spacing: -.02em; display: inline-flex; align-items: center; gap: .45rem; }
        .ct-brand i { font-size: 1.35rem; }
        .ct-nav { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
        .ct-link { color: var(--ink); font-weight: 600; padding: .5rem .8rem; border-radius: 10px; display: inline-flex; align-items: center; gap: .4rem; font-size: .92rem; }
        .ct-link:hover { background: #f2ede2; color: var(--accent); }
        .ct-link.primary { background: var(--accent); color: #fff; }
        .ct-link.primary:hover { background: var(--accent-dark); color: #fff; }
        .ct-link.danger { color: #b42318; }
        .ct-link.danger:hover { background: #fdeceb; color: #b42318; }

        /* ---- Layout ---- */
        .ct-wrap { max-width: 1180px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
        .ct-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.25rem; }
        .ct-head h1 { font-weight: 900; letter-spacing: -.03em; margin: 0 0 .15rem; font-size: 1.9rem; }
        .ct-head .sub { color: var(--muted); font-weight: 600; display: inline-flex; align-items: center; gap: .4rem; }
        .ct-clear { border: 1px solid #f1c9c4; background: #fff; color: #b42318; font-weight: 700; border-radius: 11px; padding: .5rem .9rem; display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; font-size: .9rem; }
        .ct-clear:hover { background: #fdeceb; }
        .ct-layout { display: grid; grid-template-columns: minmax(0,1fr) 370px; gap: 1.4rem; align-items: start; }
        .ct-items { display: flex; flex-direction: column; gap: 1rem; }

        /* ---- Item card ---- */
        /* Three areas, so the action row can be repositioned per breakpoint without
           touching the markup: thumbnail, text block, and the qty/price footer.
           Desktop keeps the footer beside the thumbnail (under the text) exactly as
           before; the phone rule further down gives it the full card width. */
        .citem { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 1rem;
            display: grid; grid-template-columns: 96px minmax(0,1fr);
            grid-template-areas: "img body" "img foot";
            column-gap: 1rem; row-gap: 0;
            box-shadow: 0 4px 16px rgba(15,23,42,.04); transition: box-shadow .18s ease, transform .18s ease; }
        .citem-img { grid-area: img; align-self: start; }
        .citem-body { grid-area: body; }
        .citem-foot { grid-area: foot; }
        .citem:hover { box-shadow: 0 12px 28px rgba(44,82,40,.09); }
        .citem-img { width: 96px; height: 96px; background: linear-gradient(180deg,#fff,#faf6ef); border: 1px solid var(--line); border-radius: 14px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
        .citem-img img { width: 100%; height: 100%; object-fit: contain; }
        .citem-body { min-width: 0; display: flex; flex-direction: column; }
        .citem-top { display: flex; align-items: flex-start; gap: .6rem; }
        .citem-name { font-weight: 800; color: var(--ink); font-size: 1.05rem; line-height: 1.3; display: block; }
        .citem-name:hover { color: var(--accent); }
        .citem-meta { color: var(--muted); font-size: .82rem; margin-top: .15rem; }
        .citem-remove { margin-left: auto; flex-shrink: 0; border: 0; background: transparent; color: #b9b1a3; width: 32px; height: 32px; border-radius: 9px; cursor: pointer; font-size: 1.15rem; line-height: 1; display: inline-flex; align-items: center; justify-content: center; transition: all .15s ease; }
        .citem-remove:hover { background: #fdeceb; color: #b42318; }
        .citem-tags { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin-top: .5rem; }
        .ct-badge { font-size: .74rem; font-weight: 700; padding: .2rem .55rem; border-radius: 999px; }
        .ct-badge.ok { background: #e7f6ec; color: #15803d; }
        .ct-badge.out { background: #fdeceb; color: #b42318; }
        .ct-badge.warn { background: #fdf3e0; color: #b7791f; }
        .ct-badge.combo { background: #fdece0; color: #d1571f; }
        .citem-foot { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: .75rem; padding-top: .85rem; }
        .citem-qty { display: flex; align-items: center; gap: .5rem; margin: 0; }
        .citem-price { text-align: right; margin-left: auto; }
        .citem-price .unit { color: var(--muted); font-size: .8rem; display: block; }
        .citem-price .line { font-weight: 900; font-size: 1.3rem; color: var(--teal); line-height: 1.1; letter-spacing: -.02em; }

        /* qty stepper (JS hooks: .qtybox / [data-qm] / [data-qp]) */
        .qtybox { display: inline-grid; grid-template-columns: 34px 44px 34px; align-items: center; border: 1.5px solid #d9d0bf; border-radius: 11px; overflow: hidden; background: #fff; }
        .qtybox button { border: 0; background: #fff; color: var(--accent); font-weight: 900; font-size: 1.05rem; height: 36px; cursor: pointer; }
        .qtybox button:hover { background: #f4efe4; }
        .qtybox input { border: 0; text-align: center; font-weight: 800; height: 36px; width: 100%; -moz-appearance: textfield; background: #fff; }
        .qtybox input::-webkit-outer-spin-button, .qtybox input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
        .qtybox input:disabled { color: #b9b1a3; }
        .ct-update { border: 1.5px solid #d9d0bf; background: #fff; color: var(--accent); width: 36px; height: 36px; border-radius: 10px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
        .ct-update:hover { background: #f4efe4; }
        .ct-update:disabled { opacity: .5; cursor: not-allowed; }

        /* combo line */
        .citem.combo { border-color: #f6d6bf; background: linear-gradient(135deg,#fffaf6,#fff); }
        .combo-peek summary { cursor: pointer; font-size: .8rem; font-weight: 700; color: #d1571f; list-style: none; margin-top: .35rem; }
        .combo-peek summary::-webkit-details-marker { display: none; }
        .combo-peek summary::before { content: '▸ '; }
        .combo-peek[open] summary::before { content: '▾ '; }
        .combo-peek ul { margin: .35rem 0 0; padding-left: 1.1rem; }
        .combo-peek li { font-size: .8rem; color: #6f6656; line-height: 1.6; }

        /* ---- Summary ---- */
        .ct-summary { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 1.35rem; position: sticky; top: 84px; box-shadow: 0 8px 24px rgba(15,23,42,.05); }
        .ct-summary h2 { font-weight: 900; font-size: 1.25rem; letter-spacing: -.02em; margin: 0 0 1rem; }
        .free-del { background: #f4f8ee; border: 1px solid #e2ecd6; border-radius: 13px; padding: .75rem .85rem; margin-bottom: .85rem; }
        .free-del-text { font-size: .84rem; font-weight: 700; color: var(--accent); margin-bottom: .5rem; }
        .free-del-text.ok { color: #15803d; }
        .free-del-bar { height: 8px; border-radius: 999px; background: #e4ddcd; overflow: hidden; }
        .free-del-bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg,#2f6b34,#5aa84f); transition: width .4s ease; }
        .save-strip { background: #eafaf0; color: #15803d; border-radius: 11px; padding: .6rem .8rem; font-weight: 700; font-size: .86rem; margin-bottom: .9rem; display: flex; align-items: center; gap: .4rem; }
        .sum-row { display: flex; justify-content: space-between; align-items: center; padding: .4rem 0; font-size: .95rem; }
        .sum-row .lbl { color: var(--muted); }
        .sum-divider { height: 1px; background: var(--line); margin: .6rem 0; }
        .coupon-box { display: flex; gap: .5rem; margin: 1rem 0; }
        .coupon-box input { border: 1px solid #d9d0bf; border-radius: 11px; padding: .55rem .8rem; flex: 1; min-width: 0; }
        .coupon-box input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47,107,52,.12); }
        .coupon-apply { border: 1.5px solid var(--accent); color: var(--accent); background: #fff; font-weight: 700; border-radius: 11px; padding: .55rem 1rem; cursor: pointer; }
        .coupon-apply:hover { background: var(--accent); color: #fff; }
        .ct-total { display: flex; justify-content: space-between; align-items: baseline; margin: .4rem 0 1.1rem; }
        .ct-total .t-lbl { font-weight: 800; font-size: 1.1rem; }
        .ct-total .t-val { font-weight: 900; font-size: 1.75rem; color: var(--teal); letter-spacing: -.02em; }
        .ct-checkout { display: flex; align-items: center; justify-content: center; gap: .5rem; width: 100%; background: var(--accent); color: #fff; font-weight: 800; font-size: 1.02rem; border: 0; border-radius: 13px; padding: .9rem; cursor: pointer; box-shadow: 0 8px 20px rgba(47,107,52,.25); transition: background .15s ease, transform .15s ease; }
        .ct-checkout:hover { background: var(--accent-dark); color: #fff; transform: translateY(-1px); }
        .trust-mini { display: flex; gap: 1.1rem; justify-content: center; margin-top: 1rem; color: var(--muted); font-size: .78rem; flex-wrap: wrap; }
        .trust-mini span { display: inline-flex; align-items: center; gap: .3rem; }

        /* ---- Empty ---- */
        .ct-empty { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 3.5rem 1.5rem; text-align: center; box-shadow: 0 8px 24px rgba(15,23,42,.05); }
        .ct-empty i.big { font-size: 3.6rem; color: #c9c0b0; }
        .ct-empty h3 { font-weight: 800; margin: 1rem 0 .35rem; }
        .ct-empty p { color: var(--muted); max-width: 420px; margin: 0 auto 1.4rem; }

        /* per-item price meta */
        .ci-price { font-weight: 700; color: var(--ink); }
        .ci-mrp { color: #b9b1a3; }
        .ci-per { color: var(--muted); }
        .citem-actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
        .save-later { border: 0; background: transparent; color: var(--muted); font-weight: 600; font-size: .82rem; cursor: pointer; display: inline-flex; align-items: center; gap: .3rem; padding: .3rem .2rem; }
        .save-later:hover { color: #e11d48; }
        .save-later.saved { color: #e11d48; }

        /* delivery / order note */
        .ct-note { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 1rem 1.15rem; margin-top: 1.1rem; box-shadow: 0 4px 16px rgba(15,23,42,.04); }
        .ct-note label { font-weight: 700; font-size: .92rem; display: block; margin-bottom: .5rem; }
        .ct-note .opt { color: var(--muted); font-weight: 500; }
        .ct-note-row { display: flex; gap: .6rem; align-items: stretch; }
        .ct-note textarea { flex: 1; border: 1px solid #d9d0bf; border-radius: 11px; padding: .55rem .75rem; resize: vertical; font-family: inherit; min-width: 0; }
        .ct-note textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47,107,52,.12); }
        .ct-note-save { border: 1.5px solid var(--accent); background: #fff; color: var(--accent); font-weight: 700; border-radius: 11px; padding: 0 1.1rem; cursor: pointer; }
        .ct-note-save:hover { background: var(--accent); color: #fff; }

        /* eta + payment */
        .ct-eta { background: #f4f8ee; border: 1px solid #e2ecd6; border-radius: 11px; padding: .5rem .75rem; font-size: .84rem; color: var(--accent); margin: .3rem 0 0; display: flex; align-items: center; gap: .4rem; }
        .ct-pay { margin-top: 1rem; text-align: center; }
        .ct-pay-lbl { display: block; font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: .35rem; }
        .ct-pay-icons { display: flex; justify-content: center; gap: .5rem; }
        .ct-pay-icons span { width: 38px; height: 26px; border: 1px solid var(--line); border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; color: #6f6656; background: #fdfbf6; }

        /* recommendations grid */
        .ct-reco { margin-top: 1.75rem; }
        .ct-reco-head h2 { font-weight: 900; font-size: 1.15rem; letter-spacing: -.02em; margin: 0 0 .9rem; display: flex; align-items: center; }
        /* One scrollable row, not a grid.
           These are suggestions on a page whose job is "check what you have, then
           pay". Rendered as the homepage grid they became several rows of large
           cards and visually swallowed the cart above them. A single row costs one
           card's height however many suggestions there are. */
        .ct-reco-row { display: flex; gap: .8rem; overflow-x: auto; padding-bottom: .6rem;
            scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
        .ct-reco-row > * { flex: 0 0 172px; min-width: 0; scroll-snap-align: start; }
        /* A thin, unobtrusive scrollbar; the row is a peek affordance, not a panel. */
        .ct-reco-row::-webkit-scrollbar { height: 6px; }
        .ct-reco-row::-webkit-scrollbar-thumb { background: #ded6c6; border-radius: 999px; }
        .ct-reco-row::-webkit-scrollbar-track { background: transparent; }
        body.rm-dark .ct-reco-row::-webkit-scrollbar-thumb { background: #3a3324; }
        @media (max-width: 560px) { .ct-reco-row > * { flex-basis: 148px; } }
        .reco-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: .7rem; display: flex; flex-direction: column; gap: .35rem; box-shadow: 0 2px 10px rgba(15,23,42,.04); transition: box-shadow .18s ease, transform .18s ease; }
        .reco-card:hover { box-shadow: 0 10px 24px rgba(44,82,40,.09); transform: translateY(-2px); }
        .reco-img { aspect-ratio: 1/1; border-radius: 10px; background: linear-gradient(180deg,#fff,#faf6ef); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; overflow: hidden; }
        .reco-img img { width: 100%; height: 100%; object-fit: contain; }
        .reco-name { color: var(--ink); font-weight: 600; font-size: .84rem; line-height: 1.3; min-height: 34px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
        .reco-price { font-weight: 800; color: var(--teal); font-size: .95rem; }
        .reco-price s { color: #b9b1a3; font-weight: 500; font-size: .8rem; }
        .reco-add { margin-top: .1rem; border: 1.5px solid var(--accent); background: #fff; color: var(--accent); font-weight: 700; border-radius: 9px; padding: .35rem; cursor: pointer; width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: .25rem; font-size: .85rem; }
        .reco-add:hover { background: var(--accent); color: #fff; }

        .ct-footer { border-top: 1px solid var(--line); background: #fff; }
        .ct-footer-inner { max-width: 1180px; margin: 0 auto; padding: 1.2rem 1rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; color: var(--muted); }

        /* Sticky checkout: mobile only -- on desktop the summary card is already
           sticky in the right-hand column, so a second bar would be noise. */
        .ct-sticky { display: none; }
        @media (max-width: 820px) {
            .ct-sticky {
                position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
                display: flex; align-items: center; justify-content: space-between; gap: .75rem;
                background: #fff; border-top: 1px solid var(--line);
                padding: .6rem .9rem calc(.6rem + env(safe-area-inset-bottom, 0px));
                box-shadow: 0 -8px 24px rgba(0,0,0,.08);
            }
            .ct-sticky[hidden] { display: none; }
            .ct-sticky-info { display: flex; flex-direction: column; line-height: 1.15; }
            .ct-sticky-info .lbl { font-size: 12px; color: var(--muted); }
            .ct-sticky-info b { font-size: 18px; font-weight: 900; }
            .ct-sticky-btn {
                display: inline-flex; align-items: center; gap: .35rem;
                background: var(--accent); color: #fff; text-decoration: none;
                font-weight: 800; border-radius: 12px; padding: 0 1.15rem;
                min-height: 44px; white-space: nowrap;
            }
            .ct-wrap { padding-bottom: 84px; }
        }

        @media (max-width: 991px) {
            .ct-layout { grid-template-columns: 1fr; }
            .ct-summary { position: static; }
        }
        @media (max-width: 560px) {
            /* The action row moves to its own full-width line under the thumbnail.
               Beside a 76px thumb it had roughly 210px to fit a 112px stepper, a
               36px update button, "Save for later" and the line total -- they
               wrapped into each other and the card looked broken. Full width it is
               ~300px on a 360px phone, which holds the stepper on the left and the
               total on the right with room to spare. */
            .citem { grid-template-areas: "img body" "foot foot";
                grid-template-columns: 64px minmax(0,1fr); column-gap: .75rem; padding: .8rem; }
            .citem-img { width: 64px; height: 64px; border-radius: 12px; }
            .citem-foot { margin-top: .7rem; padding-top: .7rem; border-top: 1px solid var(--line);
                align-items: center; gap: .5rem; flex-wrap: nowrap; }
            .citem-actions { gap: .5rem; flex-wrap: nowrap; min-width: 0; }
            .citem-price { margin-left: auto; flex: 0 0 auto; white-space: nowrap; }
            .citem-price .line { font-size: 1.1rem; }
            .citem-price .unit { display: none; }        /* the number is self-evident here */
            .citem-name { font-size: .95rem; }
            .citem-meta { font-size: .78rem; line-height: 1.45; }
            .citem-tags { margin-top: .35rem; }
            /* Heart only. "Save for later" is a bare text node next to the icon, so
               there is nothing to target but the parent's font-size; the icon gets
               its size back explicitly. Dropping the label is what leaves the row
               comfortable: stepper + heart + total in ~230px of a 300px line. */
            .save-later { font-size: 0; padding: .4rem; }
            .save-later i { font-size: 1.15rem; }
            .ct-head h1 { font-size: 1.45rem; }
            .ct-wrap { padding-left: .75rem; padding-right: .75rem; }

            /* Secondary controls drop; the back link never does. */
            .ct-nav .ct-link.hide-sm { display: none; }
            /* Back becomes an icon-only 44px target instead of disappearing. */
            .ct-back span { display: none; }
            .ct-back { padding: .5rem; min-width: 44px; justify-content: center; }
            /* The row is brand + back + one action on a 360px screen. */
            .ct-topbar-inner { gap: .5rem; padding: .7rem .75rem; flex-wrap: nowrap; }
            .ct-brand { font-size: 1.15rem; }
            .ct-nav { gap: .25rem; }
            .ct-link { padding: .5rem .6rem; font-size: .88rem; }
        }


/* ---------- Dark mode ----------
   This page has its own shell rather than the storefront header/footer, so none
   of storefront.css's dark rules ever applied to it: a shopper in dark mode went
   from a dark catalogue straight into a bright white cart. The class comes from
   the rm_theme cookie via theme_body_class(), the same source the rest of the
   storefront uses, so the two agree from the first paint. */
body.rm-dark { --line: #3a3324; --ink: #ece6db; --muted: #a89e8c;
    background: linear-gradient(180deg,#17140e 0%,#1d1912 34%,#141009 100%); color: var(--ink); }
body.rm-dark .ct-topbar { background: rgba(28,24,16,.94); }
body.rm-dark .ct-brand { color: #86b06f; }
body.rm-dark .ct-link { color: var(--ink); }
body.rm-dark .ct-link:hover { background: #2a2418; color: #86b06f; }
body.rm-dark .ct-link.primary { color: #fff; }
body.rm-dark .ct-clear { background: #221d14; border-color: #5a2f2a; }
body.rm-dark .citem,
body.rm-dark .ct-summary,
body.rm-dark .ct-empty,
body.rm-dark .ct-note,
body.rm-dark .ct-eta,
body.rm-dark .ct-pay,
body.rm-dark .save-strip,
body.rm-dark .coupon-box,
body.rm-dark .reco-card,
body.rm-dark .combo-peek,
body.rm-dark .ct-sticky { background: #221d14; border-color: var(--line); color: var(--ink); }
body.rm-dark .citem-img,
body.rm-dark .reco-img,
body.rm-dark .qtybox,
body.rm-dark .free-del-bar { background: #2a2418; border-color: var(--line); }
body.rm-dark .citem-name,
body.rm-dark .reco-name,
body.rm-dark .ct-total { color: var(--ink); }
body.rm-dark .citem-meta,
body.rm-dark .ci-per,
body.rm-dark .ci-mrp,
body.rm-dark .free-del-text { color: var(--muted); }
body.rm-dark .qtybox button,
body.rm-dark .ct-note textarea,
body.rm-dark .coupon-box input { background: #2a2418; border-color: var(--line); color: var(--ink); }
body.rm-dark .ct-badge.ok { background: #1c3524; color: #7fce97; }
body.rm-dark .ct-badge.warn { background: #3a2e14; color: #e0c072; }
body.rm-dark .ct-badge.out { background: #3d1f1c; color: #f0a29a; }
body.rm-dark .ct-badge.combo { background: #3d2a17; color: #eab088; }

/* The toggle is a <button> sitting among <a> links; without this it inherits the
   browser's button chrome and breaks the row. */
.ct-nav button.ct-link, .co-nav button.co-link { border: 0; background: transparent; font: inherit; cursor: pointer; }
