/* ===================== eTroniX — Cart / Checkout / Receipt (mirrors source cart.css) ===================== */

.cartpage { padding-top: 26px; padding-bottom: 50px; }
.cart-title { font-size: 34px; letter-spacing: -0.03em; margin-bottom: 6px; }
.cart-sub { color: var(--ink-4); font-size: 14px; margin-bottom: 28px; }

/* ---- Steps indicator ---- */
.cart-steps { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.cstep { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 14px; color: var(--ink-4); padding: 8px 16px 8px 8px; border-radius: 30px; background: var(--surface); border: 1px solid var(--line); }
.cstep-n { width: 26px; height: 26px; border-radius: 50%; background: var(--bg-2); color: var(--ink-3); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; }
.cstep.active { color: var(--ink); }
.cstep.active .cstep-n { background: var(--blue); color: #fff; }
.cstep.done .cstep-n { background: var(--green); color: #fff; }

/* ---- Back link ---- */
.back-link { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-3); font-weight: 700; font-size: 13.5px; margin-bottom: 6px; }
.back-link:hover { color: var(--blue); }

/* ---- Empty state ---- */
.empty.card { padding: 54px 30px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.empty.card h3 { font-size: 22px; }
.empty.card p { color: var(--ink-3); max-width: 380px; }

/* ---- Cart layout ---- */
.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; }
@media (max-width: 900px) { .cart-layout { grid-template-columns: 1fr; } }

/* ---- Cart lines ---- */
.cart-lines { display: flex; flex-direction: column; gap: 12px; }
.cart-line { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; }
.cart-img { width: 90px; height: 90px; flex: 0 0 auto; object-fit: contain; border-radius: var(--r-md); background: #f5f7fc; user-select: none; -webkit-user-drag: none; }
.cart-info { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.cart-name { font-size: 15.5px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.cart-stock { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--green); font-weight: 600; }
.cart-stock .dot { width: 6px; height: 6px; border-radius: 50%; }
.cart-controls { display: flex; align-items: center; gap: 18px; margin-left: auto; flex: 0 0 auto; }
.cart-price { text-align: right; display: flex; flex-direction: column; gap: 2px; align-items: flex-end; min-width: 96px; }
.cart-each { font-size: 11px; color: var(--ink-4); }
.cart-del { width: 40px; height: 40px; border-radius: 11px; color: var(--ink-4); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.cart-del:hover { background: var(--red-soft); color: var(--red); }
.cart-del svg { width: 19px; height: 19px; }
@media (max-width: 520px) { .cart-controls { width: 100%; margin-left: 0; justify-content: space-between; padding-top: 6px; border-top: 1px solid var(--line); } }

/* ---- Qty stepper ---- */
.stepper { display: flex; align-items: center; background: var(--bg-2); border-radius: 12px; padding: 4px; }
.stepper button { width: 38px; height: 38px; border-radius: 9px; display: flex; align-items: center; justify-content: center; color: var(--ink); background: var(--surface); box-shadow: var(--sh-1); }
.stepper button:disabled { opacity: .4; box-shadow: none; }
.stepper button svg { width: 17px; height: 17px; }
.stepper input { width: 48px; text-align: center; border: none; background: none; font-weight: 800; font-size: 16px; font-family: var(--ff-mono); outline: none; }

/* ---- Summary ---- */
.summary { padding: 24px; position: sticky; top: 150px; }
.sum-row { display: flex; align-items: center; justify-content: space-between; padding: 7px 0; font-size: 14.5px; color: var(--ink-2); }
.sum-row b { font-weight: 700; color: var(--ink); }
.sum-total { display: flex; align-items: baseline; justify-content: space-between; }
.sum-total span { font-size: 16px; font-weight: 700; }
.sum-total b { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.sum-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 14px; padding: 12px 14px; background: var(--blue-soft); border-radius: 12px; font-size: 12px; color: var(--blue-deep); line-height: 1.4; }
.sum-trust { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 14px; font-size: 11.5px; color: var(--ink-4); }

/* ---- Checkout form ---- */
.checkout-form { padding: 26px 28px; }
.co-sub { font-size: 16px; margin: 24px 0 14px; letter-spacing: -0.01em; }
.radio-cards { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .radio-cards { grid-template-columns: 1fr; } }
.radio-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1.5px solid var(--line-2); border-radius: 14px; cursor: pointer; transition: all .15s; }
.radio-card input { display: none; }
.radio-card svg { width: 24px; height: 24px; color: var(--ink-3); flex: 0 0 auto; }
.radio-card b { display: block; font-size: 13.5px; }
.radio-card span { font-size: 11.5px; color: var(--ink-3); line-height: 1.3; }
.radio-card:hover { border-color: var(--blue); }
.radio-card.on { border-color: var(--blue); background: var(--blue-soft); }
.radio-card.on svg { color: var(--blue); }

/* ---- Bank modal (mirrors BankGateway) ---- */
.bank-modal { width: 420px; max-width: 100%; padding: 0; overflow: hidden; box-shadow: var(--sh-3); }
.bank-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; background: var(--ink); color: #fff; }
.bank-brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 15px; }
.bank-dot { width: 11px; height: 11px; border-radius: 50%; background: linear-gradient(135deg, #2f80ff, #0a3bbf); box-shadow: 0 0 10px var(--glow); flex: 0 0 auto; }
.bank-body { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.bank-center { align-items: center; justify-content: center; min-height: 240px; gap: 18px; }
.bank-amount { display: flex; align-items: baseline; justify-content: space-between; padding: 14px 16px; background: var(--blue-soft); border-radius: 12px; }
.bank-amount span { font-weight: 700; color: var(--blue-deep); }
.bank-amount b { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.bank-cancel { color: var(--ink-3); font-weight: 600; font-size: 13px; padding: 4px; }
.bank-cancel:hover { color: var(--ink); }
.bank-secure { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 11px; color: var(--ink-4); }
.spinner { width: 54px; height: 54px; border-radius: 50%; border: 4px solid var(--blue-soft); border-top-color: var(--blue); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.bank-ok { width: 64px; height: 64px; border-radius: 50%; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; animation: pop .4s cubic-bezier(.2, 1.4, .4, 1) both; }
.bank-ok svg { width: 34px; height: 34px; stroke-width: 2.4; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---- Receipt ---- */
.receipt-hero { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 26px; }
.receipt-ok { width: 72px; height: 72px; border-radius: 24px; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 12px 30px rgba(17, 163, 107, .35); animation: pop .5s cubic-bezier(.2, 1.4, .4, 1) both; margin-bottom: 6px; }
.receipt-ok svg { width: 38px; height: 38px; stroke-width: 2.4; }
.receipt-hero p { max-width: 460px; margin: 0; }
.receipt { padding: 28px 30px; }
.rc-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.rc-brand { display: flex; align-items: center; gap: 12px; }
.rc-brand .mono { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.rc-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; margin-bottom: 20px; }
.rc-meta > div { display: flex; flex-direction: column; gap: 3px; }
.rc-meta span { font-size: 12px; color: var(--ink-3); }
.rc-meta b { font-size: 14px; }
.rc-table { width: 100%; border-collapse: collapse; margin: 18px 0; }
.rc-table th { text-align: left; font-size: 11px; font-family: var(--ff-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-4); padding: 0 0 10px; font-weight: 500; }
.rc-table th:not(:first-child), .rc-table td:not(:first-child) { text-align: right; white-space: nowrap; }
.rc-table td { padding: 11px 0; font-size: 14px; border-top: 1px solid var(--line); vertical-align: top; }
.rc-sku { font-size: 11px; color: var(--ink-4); margin-top: 3px; }
.rc-totals { display: flex; flex-direction: column; gap: 8px; margin: 18px 0; align-items: flex-end; }
.rc-trow { display: flex; align-items: baseline; gap: 40px; justify-content: space-between; min-width: 280px; font-size: 14px; color: var(--ink-2); }
.rc-trow.grand { font-size: 18px; color: var(--ink); font-weight: 800; padding-top: 10px; border-top: 2px solid var(--ink); margin-top: 4px; }
.rc-trow.grand b { font-size: 22px; }
.rc-paid { display: flex; align-items: center; gap: 9px; padding: 13px 16px; background: var(--green-soft); color: var(--green); border-radius: 12px; font-weight: 700; font-size: 13.5px; }
.rc-paid svg { width: 18px; height: 18px; }
.rc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; }
@media (max-width: 520px) { .rc-actions { grid-template-columns: 1fr; } .rc-meta { grid-template-columns: 1fr; } }

.receipt-track { padding: 24px 28px; margin-top: 18px; }
.track-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.track-step { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.ts-ic { width: 46px; height: 46px; border-radius: 14px; background: var(--bg-2); color: var(--ink-4); display: flex; align-items: center; justify-content: center; margin-bottom: 4px; }
.ts-ic svg { width: 22px; height: 22px; }
.track-step.done .ts-ic { background: var(--green); color: #fff; }
.track-step b { font-size: 13px; }
.track-step span { font-size: 11px; color: var(--ink-3); }

@media print {
  .site-header, .site-footer, .receipt-hero, .receipt-track, .rc-actions, .cart-steps { display: none !important; }
  body { background: #fff; }
}
