/* Checkout, payment, and addresses — theme.css tokens. */

.phone.checkout,
.phone.payment { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
.phone.addresses { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }

.chk-title {
  flex: 1; min-width: 0;
  font-family: var(--font-serif);
  font-size: 16px; font-weight: 600; color: var(--navy);
}
.chk-title span {
  display: block;
  font-family: var(--font-sans);
  font-size: 11px; font-weight: 600; color: var(--muted);
  margin-top: 2px;
}

/* Steps */
.chk-steps {
  display: flex; align-items: center; gap: 8px;
  margin: 0 16px; padding: 12px 0 4px;
}
.chk-step { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.chk-dot {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800;
  background: var(--line); color: var(--muted);
}
.chk-step.is-on .chk-dot { background: var(--navy); color: var(--white); }
.chk-step.is-done .chk-dot { background: var(--lime); color: var(--navy-deep); }
.chk-step b {
  font-size: 11px; font-weight: 700; color: var(--muted);
}
.chk-step.is-on b { color: var(--navy); }
.chk-step-line { flex: 1; height: 2px; background: var(--line); }
.chk-step-line.is-on { background: var(--lime); }

.chk-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  margin: 12px 16px 0;
  padding: 14px;
}
.chk-card h3,
.chk-label {
  font-size: 11px; font-weight: 800; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted);
  margin: 0 0 12px;
}
.chk-h {
  font-family: var(--font-serif);
  font-size: 18px; font-weight: 600; color: var(--navy);
  margin: 0 0 4px;
}

.chk-sum-btn {
  width: calc(100% - 32px);
  margin: 12px 16px 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex; align-items: center; justify-content: space-between;
  color: var(--navy); text-align: left;
}
.chk-sum-btn .left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.chk-sum-btn .meta { font-size: 13px; font-weight: 700; }
.chk-sum-btn .save {
  font-size: 10px; font-weight: 800;
  background: var(--lime-tint); color: var(--green2);
  padding: 2px 7px; border-radius: 99px;
}
.chk-sum-btn svg { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }
.chk-sum-btn svg.is-open { transform: rotate(180deg); }

.chk-line {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.chk-line:first-child { border-top: 0; padding-top: 0; }
.chk-line .thumb {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--bg); overflow: hidden; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.chk-line .thumb img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.chk-line .info { flex: 1; min-width: 0; }
.chk-line .name {
  font-size: 12.5px; font-weight: 700; color: var(--navy);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chk-line .sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.chk-line .amt { font-size: 13px; font-weight: 800; color: var(--navy); flex-shrink: 0; }

.cart-sum-row {
  display: flex; justify-content: space-between;
  font-size: 13px; margin-bottom: 8px; color: var(--navy);
}
.cart-sum-row .muted { color: var(--muted); }
.cart-sum-row .save { color: var(--green2); font-weight: 700; }
.cart-sum-row .free { color: var(--green2); font-weight: 700; }
.cart-sum-total {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-top: 10px; margin-top: 4px; border-top: 1px dashed var(--line);
}
.cart-sum-total b { font-size: 15px; }
.cart-sum-total .amt { font-size: 22px; font-weight: 800; }
.cart-tax { font-size: 11px; color: var(--muted); text-align: right; margin: 4px 0 0; }

/* Auth */
.auth-tabs {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 12px; padding: 4px; margin-bottom: 12px;
}
.auth-tab {
  border: 0; background: transparent;
  border-radius: 9px; padding: 8px 6px;
  font-size: 12px; font-weight: 800; color: var(--muted);
}
.auth-tab.is-on { background: var(--navy); color: var(--white); }
.auth-stack { display: flex; flex-direction: column; gap: 8px; }
.auth-sep {
  display: flex; align-items: center; gap: 10px;
  margin: 12px 0; color: var(--muted); font-size: 11px; font-weight: 700;
}
.auth-sep::before, .auth-sep::after { content: ''; height: 1px; flex: 1; background: var(--line); }
.auth-google {
  width: 100%; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px; font-size: 13px; font-weight: 800;
  background: var(--white); color: var(--navy);
}
.auth-err { font-size: 12px; font-weight: 700; color: #b4533a; margin-top: 8px; }
.policy-consent {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 11px; line-height: 1.45; color: var(--muted); cursor: pointer;
}
.policy-consent input { margin-top: 2px; flex-shrink: 0; }
.policy-consent a { color: var(--navy); font-weight: 800; text-decoration: underline; }

/* Forms */
.f-label {
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--muted);
  margin: 0 0 6px; display: block;
}
.f-input, .form-input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px; font-weight: 600; color: var(--navy);
  background: var(--white); outline: none;
  -webkit-appearance: none;
}
.f-input:focus, .form-input:focus { border-color: var(--navy); }
.f-input.err { border-color: #e07a66; background: #fdf6f4; }
.f-err { font-size: 11px; font-weight: 700; color: #b4533a; margin: 4px 0 0; }
.chk-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chk-field { margin-bottom: 12px; }
.type-row { display: flex; gap: 8px; }
.type-btn {
  flex: 1; padding: 8px 6px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--white); color: var(--muted);
  font-size: 12px; font-weight: 800;
}
.type-btn.active, .type-btn.is-on {
  background: var(--navy); color: var(--white); border-color: var(--navy);
}

.check-row {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--navy); cursor: pointer;
}
.check-box {
  width: 18px; height: 18px; border-radius: 5px;
  border: 1.5px solid var(--line); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.check-box.is-on { background: var(--lime); border-color: var(--lime); color: var(--navy-deep); }
.check-box svg { width: 12px; height: 12px; }

.dash-add {
  width: calc(100% - 32px);
  margin: 12px 16px 0;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px;
  border: 1.5px dashed var(--line);
  border-radius: 14px;
  background: transparent;
  color: var(--muted); font-size: 13px; font-weight: 700;
}
.dash-add.is-on { border-color: var(--lime); color: var(--green2); background: var(--lime-tint); }

/* Address cards */
.addr-card {
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  cursor: pointer;
}
.addr-card.selected {
  border-color: var(--navy);
  box-shadow: 0 0 0 1px var(--navy);
}
.addr-head { display: flex; align-items: flex-start; gap: 10px; }
.addr-radio {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--line); flex-shrink: 0; margin-top: 2px;
  display: flex; align-items: center; justify-content: center;
}
.addr-card.selected .addr-radio { border-color: var(--navy); background: var(--navy); }
.addr-radio i { width: 6px; height: 6px; border-radius: 50%; background: var(--white); display: none; }
.addr-card.selected .addr-radio i,
.method-card.is-on .addr-radio i,
.method-card.active-method .addr-radio i { display: block; }
.addr-name { font-size: 14px; font-weight: 800; color: var(--navy); margin: 0; }
.addr-lines { font-size: 12.5px; color: var(--muted); line-height: 1.45; margin: 4px 0 0; }
.addr-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.pill-home, .pill-work, .pill-other, .pill-default {
  font-size: 10px; font-weight: 800; padding: 3px 8px; border-radius: 99px;
}
.pill-home { background: #eef3f8; color: var(--navy); }
.pill-work { background: var(--lime-tint); color: var(--green2); }
.pill-other { background: var(--amber-tint); color: #92400e; }
.pill-default { background: var(--lime-tint); color: var(--green2); border: 1px solid var(--lime-line); }
.addr-acts {
  display: flex; align-items: center; gap: 8px;
  margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line);
}
.ghost-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 10px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--white);
  font-size: 11px; font-weight: 800; color: var(--navy);
}
.ghost-btn.danger { color: #b4533a; border-color: #f0b4a8; }
.link-lime { margin-left: auto; font-size: 11px; font-weight: 800; color: var(--green2); background: none; border: 0; }

.addr-stack { display: flex; flex-direction: column; gap: 10px; margin: 0 16px; }

/* Payment methods */
.method-card {
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  cursor: pointer;
}
.method-card.active-method, .method-card.is-on {
  border-color: var(--navy);
  box-shadow: 0 0 0 1px var(--navy);
}
.method-head { display: flex; align-items: center; gap: 10px; }
.method-head h4 { margin: 0; font-size: 14px; font-weight: 800; }
.method-head p { margin: 2px 0 0; font-size: 11px; color: var(--muted); }
.method-body { margin-top: 14px; }
.upi-row { display: flex; gap: 8px; margin-bottom: 12px; }
.upi-app, .bank-btn {
  flex: 1; padding: 10px 6px;
  border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--white); color: var(--navy);
  font-size: 10px; font-weight: 800; text-align: center;
}
.upi-app.active-app, .bank-btn.active-bank {
  border-color: var(--navy); background: #eef3f8;
}
.bank-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.card-preview {
  background: linear-gradient(135deg, var(--navy) 0%, #2d4a8a 100%);
  border-radius: 14px; padding: 16px; color: var(--white);
  min-height: 110px; position: relative; overflow: hidden; margin-bottom: 12px;
}
.cod-note {
  background: var(--amber-tint); border: 1px solid #f3d5a8;
  border-radius: 12px; padding: 10px 12px;
  font-size: 12px; color: #92400e; line-height: 1.45;
}
.ssl-note {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin: 16px; font-size: 11px; color: var(--muted); font-weight: 600;
}

/* Sticky CTA */
.chk-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 28;
  max-width: 430px; margin: 0 auto;
  background: var(--white);
  border-top: 1px solid var(--line);
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
}
.chk-bar .warn { font-size: 11.5px; font-weight: 700; color: #b4533a; text-align: center; margin: 0 0 8px; }
.chk-bar .btn-navy {
  width: 100%; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; font-size: 14px;
}
.chk-bar .btn-navy.is-disabled,
.chk-bar .btn-navy:disabled {
  background: var(--line); color: var(--muted); cursor: not-allowed;
}
.chk-bar .btn-navy.center { justify-content: center; gap: 8px; }

.cart-trust {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px;
  margin: 12px 16px 0;
}
.cart-trust .cell {
  background: var(--white); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 8px; text-align: center;
}
.cart-trust .ic { width: 22px; height: 22px; margin: 0 auto 6px; color: var(--lime); }
.cart-trust .ic svg { width: 100%; height: 100%; }
.cart-trust b { display: block; font-size: 10.5px; color: var(--navy); line-height: 1.3; }

.cart-stock {
  margin: 12px 16px 0;
  padding: 14px;
  background: #fdf2f0; border: 1px solid #f0b4a8; border-radius: 16px;
}
.cart-stock h3 { color: #9a3412; font-size: 13.5px; margin: 0 0 4px; text-transform: none; letter-spacing: 0; }
.cart-stock .lead { font-size: 12px; color: #c2410c; margin: 0 0 12px; }

.deliver-recap {
  display: flex; gap: 10px; align-items: flex-start;
}
.deliver-recap svg { width: 18px; height: 18px; color: var(--lime); flex-shrink: 0; margin-top: 2px; }
.deliver-recap .k { font-size: 10px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.deliver-recap .v { font-size: 13.5px; font-weight: 800; color: var(--navy); margin-top: 2px; }
.deliver-recap .s { font-size: 12px; color: var(--muted); }
.deliver-recap .change { margin-left: auto; font-size: 12px; font-weight: 800; color: var(--navy); flex-shrink: 0; }

/* Sheet */
.sheet-bg { position: fixed; inset: 0; z-index: 40; background: rgba(21,44,70,.45); }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41;
  max-width: 430px; margin: 0 auto;
  background: var(--white);
  border-radius: 20px 20px 0 0;
  max-height: 90vh; display: flex; flex-direction: column;
}
.sheet-handle { width: 40px; height: 4px; border-radius: 99px; background: var(--line); margin: 10px auto 0; }
.sheet-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
}
.sheet-hd h3 { margin: 0; font-size: 16px; font-weight: 700; }
.sheet-body { overflow-y: auto; padding: 16px; flex: 1; }
.sheet-ft {
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}

/* Success overlay */
.success-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 55%, #1a3a18 100%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 24px;
  text-align: center; color: var(--white);
}
.success-overlay h2 { font-family: var(--font-serif); font-size: 28px; margin: 0 0 8px; }
.success-overlay .oid { color: var(--lime); font-weight: 800; font-size: 14px; }
.success-overlay .oid b { color: var(--white); }
.success-overlay .eta {
  margin: 16px 0 28px; padding: 12px 18px;
  background: rgba(255,255,255,.1); border-radius: 14px;
  display: inline-block;
}
@keyframes drawCheck { from { stroke-dashoffset: 200; } to { stroke-dashoffset: 0; } }
@keyframes popCircle {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
.anim-circle { animation: popCircle .5s ease .1s both; }
.anim-check { stroke-dasharray: 200; stroke-dashoffset: 200; animation: drawCheck .6s ease .6s forwards; }
.anim-text1 { animation: fadeUp .5s ease .9s both; }
.anim-text2 { animation: fadeUp .5s ease 1.1s both; }
.anim-text3 { animation: fadeUp .5s ease 1.3s both; }
.anim-btns { animation: fadeUp .5s ease 1.5s both; width: 100%; max-width: 360px; }
.spinner { animation: spin .8s linear infinite; }
.success-acts { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.success-acts a {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px; border-radius: 14px; font-weight: 800; font-size: 14px;
}
.success-acts .go { background: var(--lime); color: var(--navy-deep); }
.success-acts .ghost { border: 1.5px solid rgba(255,255,255,.3); color: var(--white); }

.empty-note { text-align: center; padding: 24px; color: var(--muted); font-size: 13px; font-weight: 600; }
.btn-full { width: 100%; height: 44px; border-radius: 12px; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn-navy, .btn-row .ghost-btn { flex: 1; height: 44px; justify-content: center; }

/* ---------- Desktop ---------- */
.icon-btn.is-on { background: var(--navy); }
.user-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: 99px; padding: 4px 12px 4px 4px;
  font-size: 13px; font-weight: 700; color: var(--navy);
}
.user-chip .av {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--navy); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800;
}

.chk-desktop { background: var(--bg); min-height: 100vh; }
.cart-crumbs {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0 0;
}
.cart-crumbs nav {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--muted);
}
.cart-crumbs svg { width: 12px; height: 12px; }
.cart-crumbs .now { color: var(--navy); font-weight: 600; }
.cart-crumbs .see-all { font-size: 13px; font-weight: 700; color: var(--navy); }

.chk-page { padding: 20px 0 48px; }
.chk-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
  margin-top: 18px;
}
.chk-col-sum { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 14px; }
.chk-desktop .chk-card { margin: 0; padding: 20px; }
.chk-desktop .addr-stack { margin: 0; }
.chk-desktop .dash-add { width: 100%; margin: 12px 0 0; }
.chk-desktop .chk-bar { display: none; }
.chk-desktop .chk-steps { margin: 0 0 8px; padding: 0; max-width: 520px; }
.chk-desktop .chk-step b { font-size: 13px; }
.chk-desktop .chk-dot { width: 28px; height: 28px; font-size: 12px; }
.chk-desktop .cart-trust { margin: 0; }
.chk-desktop .cart-stock { margin: 0; }

.acct-side { width: 260px; flex-shrink: 0; }
.acct-layout { display: flex; gap: 28px; align-items: flex-start; margin-top: 18px; }
.acct-main { flex: 1; min-width: 0; }
.acct-card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: 16px; padding: 16px; margin-bottom: 12px;
}
.acct-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  font-size: 13.5px; font-weight: 600; color: var(--muted);
}
.acct-nav a:hover { background: var(--bg); color: var(--navy); }
.acct-nav a.is-on { background: #eef3f8; color: var(--navy); }
.addr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal-bg { position: fixed; inset: 0; z-index: 40; background: rgba(21,44,70,.45); display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal {
  background: var(--white); border-radius: 20px; width: 100%; max-width: 520px;
  max-height: 90vh; display: flex; flex-direction: column; overflow: hidden;
}

@media (max-width: 960px) {
  .chk-layout, .acct-layout { display: block; }
  .chk-col-sum { position: static; margin-top: 18px; }
  .acct-side { width: auto; margin-bottom: 16px; }
  .addr-grid { grid-template-columns: 1fr; }
}
