/* ==== Checkout 專屬樣式 ==== */
.checkout-main { padding: 40px 24px 80px; }
.checkout-container { max-width: 1200px; margin: 0 auto; }

/* Progress */
.progress-bar-wrap { margin-bottom: 40px; }
.step-list {
  display: flex; align-items: center; gap: 8px;
  max-width: 720px; margin: 0 auto;
}
.step {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--text-mute);
  transition: color .3s;
}
.step.active, .step.done { color: var(--gold); }
.step-num {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bg-2); border: 2px solid var(--border);
  font-family: var(--font-mono); font-weight: 700; font-size: 16px;
  color: var(--text-mute);
  transition: all .3s;
}
.step.active .step-num {
  background: var(--gold); border-color: var(--gold); color: var(--bg-0);
  box-shadow: 0 0 20px var(--gold-glow);
}
.step.done .step-num {
  background: transparent; border-color: var(--gold); color: var(--gold);
}
.step.done .step-num::before { content: '✓'; }
.step.done .step-num-txt { display: none; }
.step-lbl { font-size: 12px; letter-spacing: 1px; font-weight: 500; }
.step-line { flex: 1; height: 2px; background: var(--border); border-radius: 1px; max-width: 100px; }
.step-line.done { background: var(--gold); }

@media (max-width: 640px) {
  .step-lbl { display: none; }
  .step-line { max-width: 40px; }
}

/* Grid */
.checkout-grid {
  display: grid; grid-template-columns: 1fr 340px; gap: 40px;
  align-items: start;
}
@media (max-width: 900px) {
  .checkout-grid { grid-template-columns: 1fr; }
}

.checkout-content {
  background: var(--panel-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  min-height: 500px;
}
@media (max-width: 600px) { .checkout-content { padding: 24px 20px; } }

.checkout-content h2 {
  font-family: var(--font-display); font-size: 32px; font-weight: 900;
  margin-bottom: 8px;
}
.checkout-content .lead {
  color: var(--text-dim); margin-bottom: 32px;
}

.step-panel { display: none; }
.step-panel.active { display: block; animation: fadein .3s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Store cards in checkout — with radio */
.checkout-content .stores-toolbar { margin-bottom: 20px; }
.checkout-content .stores-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.checkout-content .store-card { cursor: pointer; padding: 16px; }
.checkout-content .store-card.selected {
  border-color: var(--gold);
  box-shadow: 0 0 20px var(--gold-glow);
  background: rgba(245,194,77,.08);
}
.checkout-content .store-card .buy { display: none; }
.checkout-content .store-card h4 { font-size: 15px; }
.checkout-content .store-card .addr { display: none; }

/* Step 2 summary */
.selected-summary {
  padding: 24px;
  background: linear-gradient(135deg, rgba(245,194,77,.08), transparent);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  margin-bottom: 32px;
}
.selected-summary h4 {
  font-family: var(--font-display); font-size: 22px; margin-bottom: 4px;
}
.selected-summary .ss-addr { color: var(--text-dim); font-size: 14px; margin-bottom: 20px; }
.selected-summary .ss-meta {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  padding-top: 20px; border-top: 1px solid var(--border);
}
.selected-summary .ss-k { color: var(--text-mute); font-size: 11px; letter-spacing: 2px; margin-bottom: 4px; text-transform: uppercase; }
.selected-summary .ss-v { color: var(--text); font-family: var(--font-mono); font-weight: 600; font-size: 15px; }
.selected-summary .ss-v.gold { color: var(--gold); }

/* Addon */
.addon-box h4 { font-size: 16px; margin-bottom: 16px; color: var(--text-dim); }
.addon {
  display: flex; gap: 16px; padding: 16px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 10px;
  cursor: pointer; transition: all .2s;
}
.addon:has(input:checked) {
  border-color: var(--gold); background: rgba(245,194,77,.05);
}
.addon input {
  appearance: none;
  width: 18px; height: 18px; margin-top: 3px; flex-shrink: 0;
  border: 2px solid var(--border-strong); border-radius: 3px;
  background: transparent; cursor: pointer;
  transition: all .15s;
}
.addon input:checked {
  background: var(--gold); border-color: var(--gold);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path fill='none' stroke='%2305060f' stroke-width='2.5' stroke-linecap='round' d='M2 6l3 3 5-6'/></svg>");
  background-repeat: no-repeat; background-position: center;
}
.addon-title { font-weight: 600; margin-bottom: 4px; display: flex; justify-content: space-between; gap: 12px; }
.addon-title .addon-p { color: var(--gold); font-family: var(--font-mono); font-weight: 700; }
.addon-desc { font-size: 13px; color: var(--text-mute); }

/* Form */
.form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label {
  font-size: 13px; color: var(--text-dim); font-weight: 500;
}
.field .req { color: var(--neon-pink); }
.field input, .field select {
  padding: 14px 16px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text); font-family: var(--font-body); font-size: 15px;
  transition: all .15s;
}
.field input:focus, .field select:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(245,194,77,.15);
}
.field input::placeholder { color: var(--text-mute); }
.field .hint { font-size: 12px; color: var(--text-mute); }
.check-lbl {
  display: flex; align-items: center; gap: 10px;
  font-weight: 500; color: var(--text-dim); font-size: 14px; cursor: pointer;
}
.check-lbl input {
  width: 18px; height: 18px; appearance: none;
  border: 2px solid var(--border-strong); border-radius: 3px;
  background: transparent; cursor: pointer;
}
.check-lbl input:checked {
  background: var(--gold);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path fill='none' stroke='%2305060f' stroke-width='2.5' stroke-linecap='round' d='M2 6l3 3 5-6'/></svg>");
  background-repeat: no-repeat; background-position: center;
}

@media (max-width: 500px) { .form-grid { grid-template-columns: 1fr; } }

/* Pay methods */
.pay-methods {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin-bottom: 32px;
}
@media (max-width: 500px) { .pay-methods { grid-template-columns: 1fr; } }
.pay-method {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 20px 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer; transition: all .15s;
  position: relative;
}
.pay-method.active {
  border-color: var(--gold);
  background: rgba(245,194,77,.05);
  box-shadow: 0 0 20px var(--gold-glow);
}
.pay-method input {
  position: absolute; top: 8px; right: 8px;
  appearance: none;
  width: 18px; height: 18px;
  border: 2px solid var(--border-strong); border-radius: 50%;
}
.pay-method input:checked {
  border-color: var(--gold);
  background: radial-gradient(circle, var(--gold) 40%, transparent 45%);
}
.pm-name { font-weight: 600; font-size: 15px; }
.pm-icons { display: flex; gap: 6px; }
.pm-icons span {
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  padding: 3px 6px; background: rgba(255,255,255,.05);
  border: 1px solid var(--border); border-radius: 2px;
  color: var(--text-dim);
}

/* Credit card visual */
.cc-card { margin-bottom: 24px; }
.cc-visual {
  padding: 28px;
  background:
    linear-gradient(135deg, #131a34 0%, #1a2447 40%, #0a0d1e 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  position: relative; overflow: hidden;
  aspect-ratio: 1.6;
  max-width: 420px;
  color: white;
}
.cc-visual::before {
  content: ''; position: absolute; top: -20%; right: -20%;
  width: 60%; aspect-ratio: 1;
  background: radial-gradient(circle, rgba(245,194,77,.3), transparent 60%);
  filter: blur(20px);
}
.cc-visual::after {
  content: ''; position: absolute; bottom: -30%; left: -10%;
  width: 60%; aspect-ratio: 1;
  background: radial-gradient(circle, rgba(0,224,255,.2), transparent 60%);
  filter: blur(20px);
}
.cc-chip {
  width: 40px; height: 30px; border-radius: 4px;
  background: linear-gradient(135deg, #f5c24d, #b8871f);
  position: relative; z-index: 1;
}
.cc-brand {
  position: absolute; top: 24px; right: 28px;
  font-family: var(--font-mono); font-weight: 900; font-size: 22px;
  letter-spacing: 2px;
  color: var(--gold);
  z-index: 1;
}
.cc-num {
  position: absolute; left: 28px; bottom: 70px;
  font-family: var(--font-mono); font-size: 22px; letter-spacing: 3px;
  color: white; font-weight: 500;
  z-index: 1;
  text-shadow: 0 2px 6px rgba(0,0,0,.4);
}
.cc-row {
  position: absolute; left: 28px; right: 28px; bottom: 20px;
  display: flex; justify-content: space-between;
  z-index: 1;
}
.cc-k { font-size: 9px; color: rgba(255,255,255,.6); letter-spacing: 2px; margin-bottom: 3px; }
.cc-v { font-family: var(--font-mono); font-size: 14px; letter-spacing: 1px; text-transform: uppercase; }

@media (max-width: 500px) {
  .cc-visual { padding: 20px; }
  .cc-num { font-size: 17px; bottom: 60px; left: 20px; }
  .cc-row { left: 20px; right: 20px; }
}

/* Step nav */
.step-nav {
  display: flex; justify-content: space-between; gap: 12px;
  margin-top: 40px; padding-top: 24px;
  border-top: 1px solid var(--border);
}
.step-nav .btn-ghost { padding: 14px 24px; }
.step-nav .btn-primary { padding: 14px 32px; }
.step-nav .btn-ghost.hidden { visibility: hidden; }

/* Sidebar summary */
.checkout-sidebar { position: sticky; top: 90px; }
@media (max-width: 900px) { .checkout-sidebar { position: static; } }

.summary-card {
  padding: 32px 28px;
  background: var(--panel-strong);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 0 30px rgba(245,194,77,.08);
}
.summary-card h3 {
  font-family: var(--font-display); font-size: 22px; font-weight: 900;
  margin-bottom: 24px; padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.sm-row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 12px 0;
}
.sm-name { font-weight: 600; font-size: 15px; }
.sm-sub { font-size: 12px; color: var(--text-mute); margin-top: 4px; font-family: var(--font-mono); }
.sm-price { font-family: var(--font-mono); font-weight: 700; color: var(--text); white-space: nowrap; }
.sm-divider { height: 1px; background: var(--border); margin: 16px 0; }
.sm-total-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 8px 0 16px;
}
.sm-total-row > span:first-child {
  font-family: var(--font-display); font-weight: 700; font-size: 18px;
}
.sm-total {
  font-family: var(--font-mono); font-weight: 700; font-size: 32px;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold-deep));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sm-hint {
  font-size: 12px; color: var(--text-dim); line-height: 1.7;
  padding-top: 16px; border-top: 1px solid var(--border);
}

/* ============ Success ============ */
.success-panel {
  max-width: 640px; margin: 60px auto;
  padding: 0 24px;
}
.success-card {
  padding: 48px 40px;
  background: var(--panel-strong);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: 0 0 60px rgba(245,194,77,.15);
}
.success-icon {
  width: 80px; height: 80px; margin: 0 auto 20px;
  color: var(--neon-green);
  animation: pop .5s ease;
}
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
.success-eyebrow {
  font-family: var(--font-mono); color: var(--neon-blue);
  font-size: 12px; letter-spacing: 3px; margin-bottom: 12px;
}
.success-card h2 {
  font-family: var(--font-display); font-size: 40px; font-weight: 900;
  margin-bottom: 12px;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold-deep));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.success-card p { color: var(--text-dim); margin-bottom: 32px; }

.success-ticket {
  background: linear-gradient(135deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-align: left;
  position: relative;
}
.success-ticket::before, .success-ticket::after {
  content: ''; position: absolute; width: 20px; height: 20px;
  background: var(--bg-0); border-radius: 50%;
  left: 0; right: auto;
  top: 50%; transform: translateY(-50%);
}
.success-ticket::before { left: -10px; }
.success-ticket::after { left: auto; right: -10px; }
.st-header {
  display: grid; grid-template-columns: 1fr 1fr;
  padding: 20px 24px;
  background: linear-gradient(90deg, rgba(245,194,77,.1), transparent);
  border-bottom: 1px dashed var(--border);
}
.st-body { padding: 24px; }
.st-cols {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.st-k {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--text-mute); letter-spacing: 2px; margin-bottom: 4px;
  text-transform: uppercase;
}
.st-v { font-weight: 700; font-size: 15px; }
.st-qr { padding: 20px 24px; border-top: 1px dashed var(--border); background: rgba(0,0,0,.2); }
.qr-placeholder {
  width: 120px; height: 120px; margin: 0 auto; padding: 10px;
  background: white; border-radius: 6px;
}
