/* =========================================================
   장바구니 화면 (plan docs/plans/2026-11-21-자사몰-장바구니.md T8)
   Copied from the CEO-approved mockup 안 A (box cards) — light theme only (the shop has no dark mode).
   Mockup `@container pg` rules became `@media`; mockup-only chrome and the 안 B / 안 C parts are left out.
   Phase 3 (plan T11): 합치기 button · 합친 장바구니 안내 · editable sent lines — from the mockup's extra.css / extra2.css.
   ========================================================= */

/* Box colours (merge boxes alternate g1 / g2 · 위탁 g3 · other solo boxes grey dashed) + tooltip colours. */
:root {
    --g1: #4F46E5; --g1-soft: #EEF2FF; --g1-ink: #3B30C7;
    --g2: #0D9488; --g2-soft: #CCFBF1; --g2-ink: #0F766E;
    --cy: #06B6D4; --cy-soft: #CFFAFE; --cy-ink: #0E7490;
    --solo: #94A3B8; --on-gc: #fff;
    --st-soft: #E2E8F0; --st-ink: #334155;
    --tip-bg: #0F172A; --tip-fg: #F8FAFC;
}

/* ===== shared buttons / tags ===== */
.btn-order { background: var(--brand); color: #fff; border: 1px solid var(--brand); border-radius: var(--radius-sm); padding: .95rem 1.2rem; font-size: 1rem; font-weight: 700; width: 100%; transition: background .15s; display: flex; align-items: center; justify-content: center; gap: .5rem; cursor: pointer; min-height: 52px; text-decoration: none; }
.btn-order:hover:not(:disabled) { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-order:disabled { background: var(--border); border-color: var(--border); color: var(--muted); cursor: not-allowed; }
.btn-ghost { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; background: var(--card); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .7rem 1.1rem; font-size: .9rem; font-weight: 700; cursor: pointer; min-height: 44px; text-decoration: none; }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-clear { display: inline-flex; align-items: center; gap: .35rem; background: transparent; border: 1px solid var(--urgent-line); color: var(--urgent-ink); border-radius: var(--radius-sm); padding: .5rem .85rem; font-size: .85rem; font-weight: 600; cursor: pointer; min-height: 38px; }
.btn-clear:hover { background: var(--urgent-soft); }
.lnk { background: transparent; border: 0; color: var(--brand); font-weight: 700; font-size: .82rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: .45rem .2rem; min-height: 36px; }
.lnk:hover { color: var(--brand-dark); }
.tag { display: inline-flex; align-items: center; gap: .25rem; font-size: .72rem; font-weight: 700; padding: .16rem .6rem; border-radius: 999px; white-space: nowrap; letter-spacing: 0; }
.tag i { font-size: .8rem; }
button.tag { font-family: inherit; border: 0; line-height: 1.25; min-height: 24px; }
.tag-pay { background: var(--accent-soft); color: var(--accent-ink); }
/* [2026-11-22 배송 배지 · CEO-approved mockup] 「합배송」「단독배송」「무료배송」 take the catalog / product .sb shape and
   colours (tokens.css --sb-*): rounded rectangle, no icon. 택배비 부담 · 위탁배송 · zone chips stay as they are. The
   cart keeps its own dynamic 무료배송 (조건부 threshold met — CEO decision). */
.tag-ride { background: var(--sb-merge-bg); color: var(--sb-merge-ink); }
.tag-free { background: var(--sb-free-bg); color: var(--sb-free-ink); }
.tag-end { background: var(--border); color: var(--muted); }
.tag-merge { background: var(--brand-soft); color: var(--brand-dark); }
.tag-zone { background: transparent; color: var(--muted); border: 1px solid var(--border) !important; font-weight: 600; }
.tag-alone { background: var(--sb-alone-bg); color: var(--sb-alone-ink); }
.tag-consign { background: var(--cy-soft); color: var(--cy-ink); }
button.tag.tag-ride, button.tag.tag-alone, button.tag.tag-free { display: inline-block; vertical-align: middle; gap: 0; min-height: 0; padding: 0 .55em; border-radius: .5em; font-size: .74rem; font-weight: 700; line-height: 1.6; letter-spacing: -.01em; }
button.tag.tag-ride i, button.tag.tag-alone i, button.tag.tag-free i { display: none; }
.muted { color: var(--muted); }

/* Badge tooltips — hover on a mouse, tap (focus) on a phone. */
.tag[data-tip] { position: relative; cursor: help; }
.tag[data-tip]::after { content: attr(data-tip); display: none; position: absolute; left: 0; bottom: calc(100% + 9px); width: max-content; max-width: min(17rem, 64vw); background: var(--tip-bg); color: var(--tip-fg); font-size: .78rem; font-weight: 500; line-height: 1.5; letter-spacing: -.01em; white-space: normal; text-align: left; padding: .55rem .75rem; border-radius: 9px; box-shadow: 0 8px 22px rgba(0,0,0,.28); z-index: 50; pointer-events: none; }
.tag[data-tip]::before { content: ""; display: none; position: absolute; left: 14px; bottom: calc(100% + 3px); border: 6px solid transparent; border-top-color: var(--tip-bg); border-bottom: 0; z-index: 51; }
.tag[data-tip]:hover::after, .tag[data-tip]:hover::before,
.tag[data-tip]:focus::after, .tag[data-tip]:focus::before { display: block; }
.tag.flash { animation: flashtag 1.1s ease 2; }
@keyframes flashtag { 0%, 100% { box-shadow: 0 0 0 0 transparent; transform: none; } 35% { box-shadow: 0 0 0 5px var(--accent); transform: scale(1.12); } }
.hint-free { display: inline-flex; align-items: center; gap: .3rem; font-size: .76rem; font-weight: 700; color: var(--accent-ink); background: var(--accent-soft); border-radius: 999px; padding: .16rem .6rem; letter-spacing: 0; }

/* Quantity stepper (typed input in the middle). */
.qty-control { display: inline-flex; align-items: center; border: 1px solid var(--border); background: var(--card); border-radius: 999px; overflow: hidden; }
.qty-control button { background: transparent; border: 0; width: 34px; height: 34px; font-size: 1rem; color: var(--text); cursor: pointer; }
.qty-control button:hover { background: var(--brand-soft); color: var(--brand); }
.qty-control .qty-in { width: 2.9rem; height: 34px; border: 0; border-left: 1px solid var(--border); border-right: 1px solid var(--border); border-radius: 0; background: transparent; color: var(--text); text-align: center; font-size: .92rem; font-weight: 700; font-variant-numeric: tabular-nums; padding: 0; }
.qty-control .qty-in:focus { outline: 2px solid var(--brand); outline-offset: -2px; background: var(--brand-soft); }

/* ===== cart: common ===== */
.cart-main { padding-top: 1rem; padding-bottom: 2rem; }
.cardlist { max-width: 980px; margin: 0 auto; }
.chead { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin: .4rem 0 .7rem; }
.chead h1 { font-size: 1.5rem; font-weight: 800; letter-spacing: -.03em; margin: 0; }
.chead .cnt { color: var(--muted); font-size: .9rem; font-weight: 600; }
.chead .btn-clear { margin-left: auto; }
.lead-note { font-size: .88rem; color: var(--muted); margin: 0 0 1.1rem; line-height: 1.55; }
.cart-loading { display: flex; align-items: center; gap: .6rem; color: var(--muted); font-size: .9rem; padding: 2rem 0; margin: 0; }
.g1 { --gc: var(--g1); --gc-soft: var(--g1-soft); --gc-ink: var(--g1-ink); }
.g2 { --gc: var(--g2); --gc-soft: var(--g2-soft); --gc-ink: var(--g2-ink); }
.g3 { --gc: var(--cy); --gc-soft: var(--cy-soft); --gc-ink: var(--cy-ink); }
.gs { --gc: var(--solo); --gc-soft: var(--bg); --gc-ink: var(--muted); }
.rows { list-style: none; margin: 0; padding: 0; }
.irow { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; grid-template-areas: "thumb main rm" "thumb tail tail"; column-gap: .9rem; row-gap: .35rem; padding: 1rem 0; border-top: 1px solid var(--border); }
.irow:first-child { border-top: 0; }
.ithumb { grid-area: thumb; width: 56px; height: 56px; border-radius: var(--radius-sm); background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; overflow: hidden; }
.ithumb img { width: 100%; height: 100%; object-fit: cover; }
.imain { grid-area: main; min-width: 0; }
.iname { font-weight: 700; font-size: .95rem; line-height: 1.35; }
.imeta { font-size: .78rem; color: var(--muted); margin-top: .1rem; }
.imeta.okline { color: var(--safe-ink); font-weight: 600; display: block; }
.imeta.okline i { margin-right: .3rem; }
.iopts { display: flex; flex-direction: column; gap: .45rem; margin-top: .6rem; }
.iopt { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.iopt.is-ended .oname { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.oname { font-size: .85rem; font-weight: 600; min-width: 2.6rem; }
.osub { margin-left: auto; font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.rm { grid-area: rm; align-self: start; width: 36px; height: 36px; border: 0; background: transparent; color: var(--muted); border-radius: 8px; cursor: pointer; font-size: 1rem; }
.rm:hover { background: var(--urgent-soft); color: var(--urgent-ink); }
.itail { grid-area: tail; display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .6rem; }
.itotal { margin-left: auto; font-weight: 800; font-size: 1rem; font-variant-numeric: tabular-nums; }
.irow.stale .ithumb { filter: grayscale(1); opacity: .55; }
.irow.stale .iname, .irow.stale .imeta, .irow.stale .itotal, .irow.stale .oname { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.irow.stale .tag, .irow.stale .stale-note { text-decoration: none; }
.irow.stale .stale-note { margin: 0; }

/* Cards on this page are plain blocks (Bootstrap's .card is a flex column with its own border tokens). */
.cart-main .card { display: block; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.3rem; }
.cart-main .card h2 { font-size: 1.05rem; font-weight: 800; margin: 0 0 .8rem; letter-spacing: -.02em; }
.tot { margin: 0; }
.tot > div { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0; font-size: .9rem; }
.tot dt { color: var(--muted); font-weight: 500; }
.tot dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.tot .disc dt, .tot .disc dd { color: var(--urgent-ink); }
.tot .final { border-top: 1px solid var(--border); margin-top: .5rem; padding-top: .8rem; }
.tot .final dt { color: var(--text); font-weight: 800; }
.tot .final dd { color: var(--brand); font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; }
.saved { display: flex; gap: .5rem; align-items: center; background: var(--safe-soft); color: var(--safe-ink); border-radius: var(--radius-sm); padding: .6rem .85rem; font-size: .85rem; font-weight: 700; margin: .8rem 0 0; }
.note-info { display: flex; gap: .5rem; align-items: flex-start; font-size: .82rem; color: var(--muted); line-height: 1.55; margin: .8rem 0 0; padding: .65rem .85rem; background: var(--bg); border-radius: var(--radius-sm); }
.note-info i { color: var(--brand); margin-top: .12rem; }
.store-note { margin: 0 0 1rem; background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.store-note i { color: var(--accent-ink); }
.benefit-note { display: flex; gap: .5rem; align-items: center; background: var(--safe-soft); color: var(--safe-ink); border-radius: var(--radius-sm); padding: .6rem .9rem; font-size: .85rem; font-weight: 700; margin: 0 0 1rem; }

/* 택배비 계산 보기 */
.calc { margin-top: .5rem; }
.calc summary { cursor: pointer; color: var(--brand); font-weight: 700; font-size: .85rem; list-style: none; display: inline-flex; align-items: center; gap: .35rem; min-height: 32px; }
.calc summary::-webkit-details-marker { display: none; }
.calc .chev { transition: transform .15s; font-size: .75rem; }
.calc[open] .chev { transform: rotate(180deg); }
.calc-body { margin-top: .5rem; padding: .8rem .95rem; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: .82rem; line-height: 1.65; }
.calc-body ul { margin: 0 0 .5rem; padding-left: 1.1rem; }
.calc-body li { margin-bottom: .3rem; }
.calc-sum { margin: 0; padding-top: .5rem; border-top: 1px dashed var(--border); font-weight: 600; }

/* 결제 방식 (required) */
.paymode { border: 0; margin: 1.2rem 0 0; padding: 0; min-width: 0; }
.paymode legend { display: block; float: none; width: auto; font-size: .95rem; font-weight: 800; margin: 0 0 .75rem; padding: 0; }
.paymode legend .req { color: var(--urgent-ink); margin-left: .2rem; }
.pm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.pm-card { position: relative; display: flex; gap: .8rem; align-items: flex-start; padding: .9rem 1rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: var(--card); cursor: pointer; min-height: 64px; margin: 0; }
.pm-card:hover { border-color: var(--brand); }
.pm-card input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pm-card:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.pm-card.on { border-color: var(--brand); background: var(--brand-soft); }
.pm-ico { width: 38px; height: 38px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; font-size: 1.15rem; flex-shrink: 0; }
.pm-card.on .pm-ico { background: var(--brand); color: #fff; }
.pm-t { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.pm-t b { font-size: .95rem; }
.pm-t small { font-size: .8rem; color: var(--muted); line-height: 1.45; }
.pm-ck { margin-left: auto; color: var(--muted); font-size: 1.2rem; flex-shrink: 0; }
.pm-card.on .pm-ck { color: var(--brand); }
.gen-hint { font-size: .8rem; color: var(--muted); margin: .6rem 0 0; text-align: center; }
.gen-wrap { margin-top: 1rem; }

/* Empty states (common.css `.empty i` is for the big icon only — keep the button icon normal). */
.empty { text-align: center; padding: 4rem 1rem; color: var(--muted); }
.empty .ei { font-size: 3.2rem; display: block; margin-bottom: 1rem; color: var(--border); }
.empty h2 { font-size: 1.2rem; font-weight: 800; color: var(--text); margin: 0 0 .4rem; }
.empty p { margin: 0 0 1.4rem; font-size: .9rem; }
.empty .btn-order { width: auto; display: inline-flex; padding: .85rem 1.8rem; }
.empty .btn-order i { font-size: 1.05rem; display: inline; margin: 0; color: inherit; }
.empty-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.empty-active { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); text-align: center; padding: 2rem 1rem; margin-bottom: 1rem; }
.empty-active .ei { font-size: 2.2rem; color: var(--border); display: block; margin-bottom: .5rem; }
.empty-active h2 { font-size: 1.05rem; font-weight: 800; margin: 0 0 .3rem; }
.empty-active p { margin: 0 0 1rem; font-size: .85rem; color: var(--muted); }
.empty-active .btn-ghost { display: inline-flex; }
.empty-active.load-error .ei { color: var(--urgent-line); }

/* ===== 안 A: box cards ===== */
.boxcard { background: var(--card); border: 1.5px solid var(--gc); border-radius: var(--radius); overflow: visible; margin-bottom: 1.1rem; }
.boxcard.gs { border-style: dashed; }
.boxhead { display: flex; align-items: center; gap: .85rem; padding: .8rem 1.1rem; background: var(--gc-soft); border-bottom: 1.5px solid var(--gc); border-radius: calc(var(--radius) - 2px) calc(var(--radius) - 2px) 0 0; }
.boxcard.gs .boxhead { border-bottom-style: dashed; }
.boxicon { width: 40px; height: 40px; border-radius: 11px; background: var(--gc); color: var(--on-gc); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; flex-shrink: 0; }
.boxhead h2 { font-size: 1rem; font-weight: 800; margin: 0; letter-spacing: -.02em; color: var(--text); }
.boxhead p { margin: .1rem 0 0; font-size: .8rem; color: var(--muted); line-height: 1.4; }
.boxfee { margin-left: auto; text-align: right; flex-shrink: 0; }
.boxfee span { display: block; font-size: .72rem; color: var(--muted); font-weight: 600; }
.boxfee b { font-size: 1.1rem; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.boxcard .rows { padding: 0 1.1rem; }
.boxfoot { padding: .75rem 1.1rem .9rem; border-top: 1px dashed var(--border); background: var(--bg); border-radius: 0 0 calc(var(--radius) - 2px) calc(var(--radius) - 2px); }
.boxfoot .why { font-size: .82rem; color: var(--muted); line-height: 1.55; margin: 0; display: flex; gap: .45rem; }
.boxfoot .why i { color: var(--gc); margin-top: .1rem; }
.sum-card { margin-top: 1.4rem; }

/* ===== 보낸 상품 ===== */
.sent { margin-top: 1.6rem; background: var(--bg); border: 1px dashed var(--border); border-radius: var(--radius); padding: 1rem 1.2rem 1.1rem; color: var(--muted); }
.sent-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.sent-head h2 { font-size: 1rem; font-weight: 800; margin: 0; color: var(--muted); display: flex; gap: .45rem; align-items: center; letter-spacing: -.02em; }
.sent-head .lnk { margin-left: auto; }
.sent-note { font-size: .8rem; line-height: 1.55; margin: .3rem 0 .9rem; }
.sent-batch { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .8rem 1rem; margin-bottom: .7rem; }
.sent-bhead { display: flex; align-items: center; gap: .4rem .8rem; flex-wrap: wrap; }
.sent-bhead h3 { font-size: .9rem; font-weight: 700; margin: 0; color: var(--text); display: flex; gap: .4rem; align-items: center; }
.sent-bhead .acts { margin-left: auto; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.sent-batch details > summary { cursor: pointer; font-size: .8rem; font-weight: 600; color: var(--muted); list-style: none; display: inline-flex; gap: .35rem; align-items: center; min-height: 34px; }
.sent-batch details > summary::-webkit-details-marker { display: none; }
.sent-batch details[open] .chev { transform: rotate(180deg); }
.sent-batch .chev { font-size: .7rem; transition: transform .15s; }
.sent-list { list-style: none; margin: .2rem 0 0; padding: 0; }
.sent-list li { display: flex; gap: .7rem; align-items: center; padding: .5rem 0; border-top: 1px dashed var(--border); font-size: .84rem; }
.sent-list .st { width: 38px; height: 38px; border-radius: 9px; background: var(--border); color: var(--muted); display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; }
.sent-list .st img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.4); }
.sent-list .sn { flex: 1; min-width: 0; color: var(--muted); }
.sent-list .sn b { display: block; color: var(--muted); font-weight: 700; }
.sent-list .sp { font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.sent-fee { display: flex; gap: .45rem; align-items: flex-start; font-size: .8rem; line-height: 1.5; margin: .5rem 0 0; color: var(--muted); }
.sent-fee i { margin-top: .12rem; }
.sent-erp { display: flex; gap: .5rem; font-size: .78rem; line-height: 1.55; margin: .2rem 0 0; color: var(--muted); }
.sent-erp i { margin-top: .12rem; color: var(--brand); }

/* Phase 3 — 합치기 · 보낸 줄 수량 수정 (mockup extra.css / extra2.css). The sent-item rules come after .sent-list li
   so they win at the same specificity (the sent name is dark again and the option rows hang under it). */
.btn-merge { display: inline-flex; align-items: center; gap: .35rem; background: var(--card); border: 1px solid var(--brand); color: var(--brand); border-radius: var(--radius-sm); padding: .45rem .8rem; font-size: .82rem; font-weight: 700; cursor: pointer; min-height: 38px; }
.btn-merge:hover { background: var(--brand-soft); }
.merge-note { display: flex; gap: .55rem; align-items: flex-start; background: var(--brand-soft); color: var(--brand-dark); border: 1px solid var(--brand); border-radius: var(--radius-sm); padding: .7rem .9rem; font-size: .85rem; font-weight: 600; line-height: 1.55; margin: 0 0 1rem; }
.merge-note i { margin-top: .12rem; }
.tag-edit { background: var(--accent-soft); color: var(--accent-ink); }
.sent-head .tag-edit { margin-left: .2rem; }
.sent-list .sent-item { align-items: flex-start; padding: .6rem 0; }
.sent-list .sent-item:first-child { border-top: 0; }
.sent-list .sent-item .sn > b { color: var(--text); margin-bottom: .3rem; }
.sent-list .sent-item .sp { padding-top: .1rem; }
.sopt { display: flex; align-items: center; gap: .5rem .6rem; flex-wrap: wrap; margin-top: .3rem; }
.sopt .oname { color: var(--muted); }
.sopt .prev { font-size: .78rem; color: var(--muted); }
.sopt.edited .qty-control { border-color: var(--accent); }
.sent-fee.changed { color: var(--accent-ink); font-weight: 600; }
.sent-note.sent-editonly { margin: .4rem 0 0; }
.note-info.edits-only { margin: 0 0 .2rem; }

/* ===== order sheet (result page · modal copy) ===== */
.sheet { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1rem 1.1rem; font-family: 'Pretendard', ui-monospace, Consolas, monospace; font-size: .85rem; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; color: var(--text); }
.sheet b { color: var(--brand); font-weight: 800; }
.sheet .nt { color: var(--accent-ink); }
.sheet.small { font-size: .78rem; max-height: 240px; overflow: auto; text-align: left; }

/* ===== 주문서를 복사했어요 (result page) ===== */
.res-main { padding-top: .4rem; padding-bottom: 1rem; max-width: 880px; margin: 0 auto; width: 100%; }
.res-head { display: flex; align-items: center; gap: .8rem; margin: 0 0 .5rem; }
.res-head .ok { width: 44px; height: 44px; border-radius: 50%; background: var(--safe-soft); color: var(--safe-ink); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; }
.res-head h1 { font-size: 1.5rem; font-weight: 800; letter-spacing: -.03em; margin: 0; }
.howto { display: flex; gap: .6rem; list-style: none; margin: 1rem 0 1.2rem; padding: 0; counter-reset: h; }
.howto li { flex: 1; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .7rem .85rem; font-size: .84rem; font-weight: 600; display: flex; gap: .55rem; align-items: center; counter-increment: h; }
.howto li::before { content: counter(h); width: 24px; height: 24px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark); display: flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 800; flex-shrink: 0; }
.howto li.on { border-color: var(--safe); }
.howto li.on::before { background: var(--safe); color: #fff; content: "✓"; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: .7rem; margin: 0 0 .8rem; }
.cart-main .sheet-head h2 { margin: 0; }
.res-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1rem; }
.res-actions > * { flex: 1 1 12rem; }

@media (max-width: 767.98px) {
    .pm-grid { grid-template-columns: 1fr; }
    .boxhead { padding: .75rem .9rem; }
    .boxcard .rows { padding: 0 .9rem; }
    .boxfoot { padding: .75rem .9rem; }
    .boxfee b { font-size: 1rem; }
    .howto { flex-direction: column; }
}

/* =========================================================
   합배송 추천 (2026-11-22 · CEO-picked mockup 안 1) — a swipe row of cards under a 합배송 box (between the rows and the
   footer) + the 옵션 고르기 sheet (desktop: centred box · phone: bottom sheet). Copied from the mockup's msug / scard /
   btn-add / osheet / ochip rules; the emoji tile became the product photo, the toast is the shop's own (common.css).
   ========================================================= */
/* D-day chip — the catalog's colours (catalog.css .dday-pill) at the mockup's size; 상시 = openend. */
.dd { display: inline-flex; align-items: center; font-size: .7rem; font-weight: 800; padding: .14rem .55rem; border-radius: 999px; line-height: 1.4; letter-spacing: 0; white-space: nowrap; }
.dd.urgent { background: var(--urgent); color: #fff; }
.dd.thisweek { background: var(--accent); color: #6B3F00; }
.dd.nextweek { background: var(--brand-soft); color: var(--brand); }
.dd.later { background: var(--safe-soft); color: var(--safe-ink); }
.dd.openend { background: #F1F5F9; color: var(--muted); }
.sph .dd { position: absolute; top: .5rem; left: .5rem; box-shadow: 0 1px 5px rgba(15, 23, 42, .25); }
.msug .sb, .osheet .sb { font-size: .7rem; line-height: 1.6; }
.otag { display: inline-block; padding: 0 .45rem; border-radius: 5px; font-size: .7rem; font-weight: 700; line-height: 1.6; background: var(--brand-soft); color: var(--brand); }

/* One suggestion card. */
.scard { list-style: none; position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; min-width: 0; }
.sph { position: relative; aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; background: var(--bg); color: var(--muted); font-size: 2.4rem; overflow: hidden; }
.sph img { width: 100%; height: 100%; object-fit: cover; }
.sbody { display: flex; flex-direction: column; gap: .35rem; padding: .7rem .75rem .8rem; flex: 1; }
.sname { font-size: .9rem; font-weight: 700; line-height: 1.35; margin: 0; letter-spacing: -.02em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; word-break: keep-all; }
.smeta { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .35rem; }
.sprice { font-size: 1.02rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.szero { font-size: .74rem; font-weight: 700; color: var(--safe-ink); display: flex; align-items: center; gap: .3rem; }
.szero.up { color: var(--accent-ink); }
.btn-add { margin-top: auto; display: inline-flex; align-items: center; justify-content: center; gap: .3rem; width: 100%; min-height: 42px; padding: .45rem .6rem; border: 1px solid var(--brand); background: var(--card); color: var(--brand); border-radius: var(--radius-sm); font-weight: 800; font-size: .88rem; cursor: pointer; white-space: nowrap; }
.btn-add:hover { background: var(--brand-soft); }
.btn-add.opt { border-color: var(--border); color: var(--text); }
.btn-add.opt:hover { border-color: var(--brand); color: var(--brand); }
.btn-add.opt i { font-size: .75rem; }
.sbody .btn-add { margin-top: .35rem; }

/* The row under a box (box colour from .g1 / .g2 / .gs). */
.msug { padding: .9rem 1.1rem 1rem; border-top: 1.5px dashed var(--gc); background: color-mix(in srgb, var(--gc-soft) 50%, #fff); }
.msug-head { display: flex; align-items: center; gap: .6rem; }
.msug-t { display: flex; align-items: center; gap: .5rem; min-width: 0; flex: 1; }
.msug-t i { color: var(--gc); font-size: 1.1rem; flex-shrink: 0; }
.msug-t h3 { font-size: .95rem; font-weight: 800; margin: 0; letter-spacing: -.02em; line-height: 1.4; word-break: keep-all; }
.msug-t .zn { color: var(--gc-ink); }
.msug-n { font-size: .78rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.msug-nav { display: inline-flex; gap: .3rem; }
.msug-nav button { width: 32px; height: 32px; border: 1px solid var(--border); background: var(--card); border-radius: 50%; color: var(--text); cursor: pointer; font-size: .8rem; }
.msug-nav button:hover { border-color: var(--brand); color: var(--brand); }
.msug-sub { font-size: .8rem; color: var(--muted); margin: .35rem 0 0; line-height: 1.5; }
.msug-row { list-style: none; margin: .8rem -1.1rem 0; padding: .1rem 1.1rem .7rem; display: flex; gap: .7rem; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-left: 1.1rem; scrollbar-width: thin; }
.msug-row .scard { flex: 0 0 172px; scroll-snap-align: start; }
.msug-row::after { content: ""; flex: 0 0 .4rem; }

/* 옵션 고르기 sheet. z-index 1045 (Bootstrap's offcanvas level): above the sticky header (1020), under every modal
   (Bootstrap 1055 · the shop's own backdrops 1500 / 2000) and the toast (2100) — a 「장바구니가 가득 찼어요」 message
   opened from the sheet must show on top of it. */
body.msheet-open { overflow: hidden; }
/* [2026-11-22 · CEO-approved mockup] While the sheet is open: the back-to-top button (z 1500, above the sheet) covered
   the right end of 「장바구니에 담기」 on a phone → hidden until the sheet closes; the 「장바구니에 담았어요」 toast moves
   to the top of the screen so it never covers the sheet's button (the phone sheet sits at the bottom). */
body.msheet-open .btn-to-top { display: none; }
body.msheet-open .pamfo-toast { top: 30px; bottom: auto; }
.ov { position: fixed; inset: 0; z-index: 1045; background: rgba(15, 23, 42, .55); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.osheet { position: relative; background: var(--card); width: min(100%, 440px); max-height: calc(100vh - 2rem); overflow-y: auto; border-radius: 18px; padding: 1.3rem 1.4rem 1.4rem; box-shadow: 0 24px 64px rgba(15, 23, 42, .3); }
.oclose { position: absolute; top: .7rem; right: .7rem; width: 36px; height: 36px; border: 0; background: transparent; color: var(--muted); border-radius: 8px; cursor: pointer; }
.oclose:hover { background: var(--bg); }
.ohead { display: flex; gap: .9rem; align-items: center; margin: 0 1.6rem 1.2rem 0; }
.ohead h3 { font-size: 1.02rem; font-weight: 800; margin: 0 0 .35rem; letter-spacing: -.02em; }
.sth { width: 52px; height: 52px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; flex-shrink: 0; background: var(--bg); color: var(--muted); overflow: hidden; }
.sth.lg { width: 64px; height: 64px; font-size: 2rem; }
.sth img { width: 100%; height: 100%; object-fit: cover; }
.ofs { border: 0; margin: 0; padding: 0; min-width: 0; }
.ofs legend { float: none; width: auto; font-size: .88rem; font-weight: 800; margin: 0 0 .75rem; padding: 0; }
.ofs legend small { font-weight: 600; color: var(--muted); margin-left: .35rem; font-size: .8rem; }
/* [2026-11-23 · CEO-picked mockup 안 2] option chips are toggle buttons (aria-pressed) — picked = on + its quantity;
   the picked options are listed below with −/typed/+ · 상품금액 · ✕ (the product page's 담은 옵션 목록, as a sheet). */
.ochips { display: flex; flex-wrap: wrap; gap: .5rem; }
.ochip { min-height: 42px; padding: .4rem 1rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: var(--card); font-weight: 700; font-size: .9rem; color: var(--text); cursor: pointer; display: inline-flex; align-items: center; gap: .35rem; }
.ochip:hover { border-color: var(--brand); }
.ochip.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
.ochip:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.ochip em { font-style: normal; font-size: .72rem; font-weight: 800; background: var(--brand); color: #fff; border-radius: 999px; padding: 0 .4rem; font-variant-numeric: tabular-nums; }
.picked { margin-top: 1rem; }
.picked h4 { font-size: .82rem; font-weight: 800; color: var(--muted); margin: 0 0 .5rem; }
.orows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.orw { display: flex; align-items: center; gap: .6rem; padding: .5rem .7rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm); min-height: 54px; background: var(--card); }
.orw.on { border-color: var(--brand); }
.orw .nm { font-weight: 700; font-size: .9rem; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.orw .nm small { display: block; font-weight: 500; color: var(--muted); font-size: .72rem; }
.orw .sub { font-size: .8rem; color: var(--brand-dark); font-weight: 700; font-variant-numeric: tabular-nums; min-width: 4.2rem; text-align: right; }
.odel { width: 30px; height: 30px; flex-shrink: 0; border: 0; background: transparent; color: var(--muted); border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.odel:hover { background: var(--urgent-soft); color: var(--urgent-ink); }
.hint0 { font-size: .8rem; color: var(--muted); padding: .6rem .2rem 0; margin: 0; }
.osumrow { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; margin-top: 1rem; padding-top: .8rem; border-top: 1px dashed var(--border); font-size: .84rem; color: var(--muted); font-weight: 600; }
.osumrow strong { font-size: 1.15rem; color: var(--text); font-weight: 800; font-variant-numeric: tabular-nums; }
.ofee { display: flex; gap: .45rem; align-items: center; font-size: .82rem; font-weight: 700; color: var(--safe-ink); margin: .5rem 0 0; }
.ofee.up { color: var(--accent-ink); }
.ofee.muted { color: var(--muted); }
/* 「닫기」 always beside the CTA (CEO-approved 11-23 · closing drops the draft) · 장바구니에서 빼기 = danger. */
.obtns { display: grid; grid-template-columns: auto 1fr; gap: .5rem; margin-top: 1rem; }
.obtns .btn-ghost { min-height: 52px; }
.btn-order.danger { background: var(--urgent-ink); border-color: var(--urgent-ink); }
.btn-order.danger:hover:not(:disabled) { background: var(--urgent); border-color: var(--urgent); }
/* 「옵션 추가 · 수정」 under an option product's lines in the cart (mockup .addopt). */
.addopt { display: inline-flex; align-items: center; gap: .4rem; margin-top: .6rem; min-height: 38px; padding: 0 .9rem; border: 1.5px dashed var(--brand); background: transparent; color: var(--brand); border-radius: var(--radius-sm); font-weight: 800; font-size: .84rem; cursor: pointer; }
.addopt:hover { background: var(--brand-soft); }

@media (max-width: 767.98px) {
    .msug { padding: .85rem .9rem .9rem; }
    .msug-nav { display: none; }
    .msug-row { margin: .7rem -.9rem 0; padding-left: .9rem; padding-right: .9rem; scroll-padding-left: .9rem; }
    .msug-row .scard { flex-basis: 142px; }
    .sph { font-size: 2rem; }
    .sname { font-size: .86rem; }
    .msug-t h3 .zl { display: block; font-size: .8rem; font-weight: 700; white-space: nowrap; }
    .msug-t h3 .zl .dot { display: none; }
    .ov { align-items: flex-end; padding: 0; }
    .osheet { width: 100%; max-height: 90vh; border-radius: 18px 18px 0 0; padding-bottom: 1.6rem; }
}
