/* Cart, checkout, payment, order and account pages. Loaded by shop_start() on those pages. */
/* ---------- Cart / checkout ---------- */
.progress { list-style: none; display: flex; justify-content: center; margin: 4px auto 22px; padding: 0; max-width: 620px; counter-reset: s; }
.progress li { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: .78rem; color: var(--muted); }
.progress li::before { content: ""; position: absolute; top: 15px; right: 50%; width: 100%; height: 2px; background: var(--line); z-index: 0; }
.progress li:first-child::before { display: none; }
.progress li.done::before, .progress li.now::before { background: var(--primary); }
.progress span { position: relative; z-index: 1; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-strong); font-weight: 750; font-size: .85rem; }
.progress .icon { width: 16px; height: 16px; }
.progress .done span { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.progress .now span { border-color: var(--primary); color: var(--primary-ink); box-shadow: 0 0 0 5px var(--primary-soft); }
.progress .now b { color: var(--text); }
.two-col { display: grid; gap: 18px; }
@media (min-width: 960px) { .two-col { grid-template-columns: minmax(0, 1fr) 390px; align-items: start; } .sticky-side { position: sticky; top: calc(var(--top-h) + 16px); } }
.cart-line { display: grid; grid-template-columns: 84px 1fr; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); transition: opacity .2s; }
.cart-line.loading { opacity: .5; }
.cart-card .cart-line:first-of-type { border-top: 0; }
.cart-line.has-problem { background: var(--danger-soft); border-radius: 10px; padding: 10px; margin: 6px 0; }
.cart-line .cl-img { width: 84px; height: 84px; border-radius: 12px; overflow: hidden; background: var(--img-bg); }
.cart-line .cl-img img, .cart-line .cl-img .img-ph { width: 100%; height: 100%; object-fit: cover; }
.cl-top { display: flex; justify-content: space-between; gap: 8px; }
.cl-name { font-weight: 650; color: var(--text); }
.cl-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 8px; }
.cl-note { font-size: .85rem; flex: 1; min-width: 150px; }
.cl-note input { min-height: 34px; padding: 5px 10px; font-size: .85rem; }
.problem { color: var(--danger); font-weight: 700; font-size: .85rem; }
.summary-card { box-shadow: var(--shadow); }
.summary-card h2 { font-size: 1.2rem; }
.totals { width: 100%; border-collapse: collapse; }
.totals td { padding: 6px 0; } .totals td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.totals .grand td { border-top: 1px dashed var(--line-strong); padding-top: 12px; font-size: 1.2rem; font-weight: 800; letter-spacing: -.01em; }
.coupon-form { display: flex; gap: 8px; }
.coupon-form input { text-transform: uppercase; }
.trust-mini { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 14px; font-size: .8rem; color: var(--muted); }
.trust-mini span { display: inline-flex; align-items: center; gap: 5px; } .trust-mini .icon { width: 15px; height: 15px; color: var(--success); }
.step-h { display: flex; align-items: center; gap: 10px; }
.options { display: grid; gap: 8px; }
.options.cols { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.opt { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
.opt:hover { border-color: var(--line-strong); }
.opt:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.opt input { width: 18px; height: 18px; accent-color: var(--primary); flex: none; }
.opt .opt-body { flex: 1; min-width: 0; } .opt .opt-body b { display: block; }
.opt .opt-logo { width: 40px; height: 40px; border-radius: 8px; overflow: hidden; flex: none; background: #fff; }
.opt .opt-logo img { width: 100%; height: 100%; object-fit: contain; }
.pin-map { height: 280px; border-radius: 12px; border: 1px solid var(--line); overflow: hidden; background: var(--surface-2); z-index: 0; }
@media (min-width: 760px) { .pin-map { height: 340px; } }
.map-tools { display: flex; gap: 8px; margin: 8px 0; flex-wrap: wrap; }
.map-tools input { flex: 1; min-width: 160px; }
.mk { background: none; border: 0; }
.mk-pin svg { width: 40px; height: 52px; fill: var(--primary); stroke: #111; stroke-width: 1; filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
.mk-pin circle { fill: #fff; }
.mk-store { width: 34px; height: 34px; border-radius: 50%; background: #111; color: #fff; display: grid; place-items: center; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.mk-store svg { width: 18px; height: 18px; }
.addr-list { display: grid; gap: 8px; margin-bottom: 10px; }
.summary-lines { list-style: none; margin: 0 0 12px; padding: 0; font-size: .9rem; }
.summary-lines li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; }
.place-bar { position: sticky; bottom: calc(var(--bn-h) + var(--safe-b)); z-index: 20; background: var(--surface); border-top: 1px solid var(--line); padding: 10px 16px; margin: 10px -16px 0; }
@media (min-width: 960px) { .place-bar { position: static; border: 0; margin: 10px 0 0; padding: 0; background: none; } }

/* ---------- Order / pay ---------- */
.steps { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 0; }
.steps li { position: relative; padding: 0 0 18px 36px; color: var(--muted); }
.steps li::before { content: ""; position: absolute; left: 7px; top: 4px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface); }
.steps li::after { content: ""; position: absolute; left: 14px; top: 20px; bottom: 0; width: 2px; background: var(--line); }
.steps li:last-child::after { display: none; }
.steps li.done { color: var(--text); } .steps li.done::before { background: var(--primary); border-color: var(--primary); }
.steps li.done::after { background: var(--primary); }
.steps li.now { color: var(--text); font-weight: 700; } .steps li.now::before { border-color: var(--primary); box-shadow: 0 0 0 5px var(--primary-soft); }
.steps li small { display: block; font-weight: 400; color: var(--muted); }
.order-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.big-check { display: inline-grid; place-items: center; width: 68px; height: 68px; border-radius: 50%; background: var(--success-soft); color: var(--success); margin-bottom: 10px; animation: pop .5s var(--ease); }
.big-check .icon { width: 34px; height: 34px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 7px 16px; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; overflow-wrap: anywhere; }
.items { list-style: none; padding: 0; margin: 0; }
.items li { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.items li:first-child { border-top: 0; }
.items .it-img { width: 52px; height: 52px; border-radius: 10px; overflow: hidden; flex: none; background: var(--img-bg); }
.items .it-img img, .items .it-img .img-ph { width: 100%; height: 100%; object-fit: cover; }
.items .it-body { flex: 1; min-width: 0; }
.qr-box { display: grid; place-items: center; padding: 14px; background: #fff; border-radius: 12px; border: 1px solid var(--line); max-width: 300px; margin: 0 auto 12px; }
.qr-box img { width: 260px; max-width: 100%; height: auto; }
.copy-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; background: var(--surface-2); }
.copy-row b { font-size: 1.05rem; overflow-wrap: anywhere; }
.amount-due { font-size: 2.1rem; font-weight: 800; color: var(--primary-ink); letter-spacing: -.02em; }

@media (max-width: 599px) { .cl-note { order: 3; flex-basis: 100%; } .cart-line { grid-template-columns: 64px 1fr; gap: 12px; } .cart-line .cl-img { width: 64px; height: 64px; } }
