/* ── Order Pages ── */
/* Override body background for order/checkout pages */
body[data-page-type="order"] {
  background: #f5f5f5;
  color: #111;
}

/* checkout */
.co-wrap{min-height:100vh;padding-top:calc(var(--nav-height) + 40px);padding-bottom:80px;background:#f5f5f5}
.co-inner{max-width:680px;margin:0 auto;padding:0 20px}

/* Progress */
.co-progress{display:flex;align-items:center;justify-content:center;gap:0;margin-bottom:32px;padding:0 20px;margin-top:40px}
.co-step-item{display:flex;align-items:center;gap:0}
.co-step-dot{width:auto;min-width:0;padding:8px 14px;border-radius:24px;background:#eee;display:flex;align-items:center;justify-content:center;font-size:clamp(10px,2.5vw,13px);font-weight:600;color:#999;transition:all 0.3s;flex-shrink:1;white-space:nowrap}
.co-step-dot.active{background:#111;color:#fff;box-shadow:0 2px 8px rgba(17,17,17,0.2)}
.co-step-dot.done{background:#111;color:#fff}
.co-step-dot svg{display:none;width:14px;height:14px;margin-right:4px}
.co-step-dot.done svg{display:inline}
.co-step-dot.done .dot-text{display:inline}
.co-step-wrap{display:flex;flex-direction:column;align-items:center}
.co-step-line{width:clamp(16px,4vw,40px);height:2px;background:#ddd;transition:background 0.3s;flex-shrink:1}
.co-step-line.done{background:#111}

/* Card */
.co-card{background:#fff;border-radius:16px;padding:32px;margin-bottom:16px;box-shadow:0 2px 12px rgba(0,0,0,0.04)}
.co-title{font-size:20px;font-weight:700;color:#111;margin-bottom:24px;padding-bottom:16px;border-bottom:2px solid #111}

/* Cart items */
.co-item{display:flex;gap:16px;align-items:center;padding:16px 0;border-bottom:1px solid #f0f0f0}
.co-item:last-child{border-bottom:none}
.co-item-img{width:140px;height:140px;background:#f8f8f8;border-radius:12px;display:flex;align-items:center;justify-content:center;padding:0;flex-shrink:0;overflow:hidden}
.co-item-img img{width:100%;height:100%;object-fit:contain}
.co-item-info{flex:1;display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.co-item-name{font-size:16px;font-weight:700;color:#111}
.co-item-qty{font-size:14px;color:#666}
.co-item-price{font-size:16px;font-weight:700;color:#111;flex-shrink:0}
.co-total{display:flex;justify-content:space-between;padding:16px 0 0;border-top:2px solid #111;margin-top:16px;font-size:16px;font-weight:700;color:#111}
.co-hint{font-size:12px;color:#aaa;margin-top:8px}

/* Card text color */
.co-card{color:#111}

/* Form */
.co-form{display:flex;flex-direction:column;gap:16px}
.co-field label{display:block;font-size:13px;font-weight:600;color:#333;margin-bottom:6px}
.co-field label .req{color:#e00;margin-left:2px}
.co-field input,.co-field select{width:100%;padding:12px 16px;border:1.5px solid #ddd;border-radius:10px;font-size:15px;font-family:inherit;outline:none}
.co-field input:focus,.co-field select:focus{border-color:#111}
.co-field input.prefilled{background:#f9f9f9}
.co-addr-row{display:flex;gap:10px}
.co-addr-row input{flex:1}
.btn-post{padding:12px 16px;background:#f0f0f0;border:1.5px solid #ddd;border-radius:10px;font-size:14px;font-weight:600;cursor:pointer;font-family:inherit;white-space:nowrap}

/* Payment method */
.pay-options{display:flex;gap:10px;flex-wrap:wrap}
.pay-opt{flex:1;min-width:120px;padding:16px;border:2px solid #eee;border-radius:12px;text-align:center;cursor:pointer;transition:all 0.2s}
.pay-opt.selected{border-color:#111;background:#f8f8f8}
.pay-opt-icon{font-size:28px;margin-bottom:6px}
.pay-opt-name{font-size:14px;font-weight:700}
.pay-opt-desc{font-size:11px;color:#888;margin-top:2px}

/* Tax invoice */
.tax-wrap{display:none;margin-top:16px;padding:16px;background:#f9f9f9;border-radius:10px}
.tax-title{font-size:14px;font-weight:700;margin-bottom:10px}
.tax-radio{display:flex;gap:20px}
.tax-radio label{display:flex;align-items:center;gap:6px;font-size:14px;cursor:pointer}
.tax-radio input{width:16px;height:16px;accent-color:#111}

/* Complete */
.co-complete-icon{width:64px;height:64px;background:#111;border-radius:50%;display:flex;align-items:center;justify-content:center;margin:0 auto 20px}
.co-complete h3{text-align:center;font-size:22px;font-weight:700;margin-bottom:8px}
.co-complete p{text-align:center;font-size:14px;color:#666;margin-bottom:4px}
.co-order-num{text-align:center;font-size:36px;font-weight:700;margin:16px 0;padding:16px;background:#f5f5f5;border-radius:12px}

/* Buttons */
.co-actions{display:flex;gap:10px;margin-top:24px}
.co-btn{flex:1;padding:16px;border:none;border-radius:12px;font-size:16px;font-weight:700;cursor:pointer;font-family:inherit;text-align:center;text-decoration:none}
.co-btn:hover{opacity:0.85}
.co-btn-prev{background:#f0f0f0;color:#555}
.co-btn-next{background:#111;color:#fff}
.co-btn-full{display:block;width:100%;padding:16px;background:#111;color:#fff;border:none;border-radius:12px;font-size:16px;font-weight:700;cursor:pointer;font-family:inherit;text-decoration:none;text-align:center;margin-top:20px}

/* Summary row */
.co-summary{background:#f9f9f9;border-radius:10px;padding:16px;margin-bottom:16px}
.co-srow{display:flex;justify-content:space-between;padding:8px 0;font-size:14px}
.co-srow-key{color:#888}.co-srow-val{font-weight:600;color:#111}

@media(max-width:480px){.co-card{padding:24px 20px}.pay-options{flex-direction:column}}

/* TossPayments */
.pay-opt[data-pay="toss"].selected{border-color:#0064FF;background:#f0f6ff}
.toss-logo-badge{display:inline-flex;align-items:center;justify-content:center;background:#0064FF;color:#fff;font-size:13px;font-weight:800;padding:7px 18px;border-radius:7px;letter-spacing:-0.2px}

/* order-lookup */
.page-content{display:flex;align-items:flex-start;justify-content:center;padding-top:calc(var(--nav-height) + 40px);padding-bottom:40px;padding-left:20px;padding-right:20px;min-height:calc(100vh - 200px)}
.wrap{background:#fff;border-radius:20px;padding:40px;width:100%;max-width:800px;box-shadow:0 4px 32px rgba(0,0,0,0.08)}
.header{display:flex;align-items:center;gap:12px;margin-bottom:28px}
.header img{height:28px}
.header h1{font-size:20px;font-weight:700;color:#111}

/* Form */
.form{display:flex;flex-direction:column;gap:14px}
.field label{display:block;font-size:13px;font-weight:600;color:#555;margin-bottom:6px}
.field input{width:100%;padding:13px 16px;border:1.5px solid #e0e0e0;border-radius:10px;font-size:15px;font-family:inherit;outline:none}
.field input:focus{border-color:#111}
.btn-main{padding:15px;background:#111;color:#fff;border:none;border-radius:10px;font-size:16px;font-weight:600;cursor:pointer;font-family:inherit;margin-top:4px}
.btn-main:hover{opacity:0.8}
.err-box{display:none;margin-top:16px;padding:14px;background:#fce4ec;border-radius:10px;color:#c62828;font-size:14px;text-align:center}

/* Order list */
.sub-text{font-size:14px;color:#888;margin-bottom:20px}
.order-item{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border:1.5px solid #eee;border-radius:12px;margin-bottom:10px;cursor:pointer;transition:all 0.15s;gap:12px}
.order-item:hover{border-color:#111;background:#fafafa}
.order-item-left{display:flex;flex-direction:column;gap:4px;min-width:0}
.order-item-num{font-size:15px;font-weight:700;color:#111}
.order-item-info{font-size:13px;color:#888;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.order-item-right{display:flex;align-items:center;gap:14px;flex-shrink:0}
.order-item-price{font-size:15px;font-weight:700;color:#111}
.st-badge{display:inline-block;padding:4px 12px;border-radius:20px;font-size:11px;font-weight:700}
.st-wait{background:#fff3e0;color:#e65100}.st-receipt{background:#e3f2fd;color:#1565c0}.st-process{background:#e8f5e9;color:#2e7d32}.st-ship{background:#ede7f6;color:#5e35b1}.st-done{background:#f5f5f5;color:#666}.st-cancel{background:#ffebee;color:#c62828}
.order-item-arrow{color:#ccc;font-size:18px}
.order-item-ship{display:block;font-size:12px;color:#5e35b1;font-weight:600;margin-top:2px}
.no-data{text-align:center;padding:40px 0;color:#999;font-size:14px}
.loading{text-align:center;padding:40px 0;color:#999;font-size:14px}

/* Detail */
.detail-back{display:inline-flex;align-items:center;gap:6px;font-size:14px;font-weight:600;color:#555;cursor:pointer;background:none;border:none;font-family:inherit;margin-bottom:24px;padding:0}
.detail-back:hover{color:#111}
.detail-header{margin-bottom:24px}
.detail-header h2{font-size:20px;font-weight:700;color:#111}
.detail-header p{font-size:13px;color:#999;margin-top:4px}

/* Status steps */
.steps{display:flex;align-items:flex-start;justify-content:space-between;position:relative;margin:0 0 32px}
.steps::before{content:'';position:absolute;top:20px;left:24px;right:24px;height:2px;background:#e0e0e0;z-index:0}
.steps-fill{position:absolute;top:20px;left:24px;height:2px;background:#111;z-index:1;transition:width 0.5s}
.stp{display:flex;flex-direction:column;align-items:center;gap:8px;z-index:2;flex:1}
.stp-icon{width:40px;height:40px;border-radius:50%;background:#e0e0e0;display:flex;align-items:center;justify-content:center;transition:all 0.3s}
.stp-icon svg{width:18px;height:18px}
.stp-num{font-size:14px;font-weight:700;color:#999}
.stp.done .stp-icon{background:#111}
.stp.active .stp-icon{background:#111;box-shadow:0 0 0 6px rgba(17,17,17,0.12);transform:scale(1.1)}
.stp.active .stp-num{color:#fff}
.stp-text{font-size:11px;font-weight:500;color:#bbb;text-align:center}
.stp.done .stp-text,.stp.active .stp-text{color:#111;font-weight:700}
.cancel-badge{display:inline-block;padding:8px 20px;background:#fce4ec;color:#c62828;border-radius:20px;font-size:15px;font-weight:700;margin:16px 0 24px}

/* Info rows */
.info-card{background:#f9f9f9;border-radius:12px;padding:20px;margin-bottom:16px}
.info-row{display:flex;justify-content:space-between;padding:10px 0;border-bottom:1px solid #eee;font-size:14px;gap:16px}
.info-row:last-child{border-bottom:none}
.info-key{color:#888;font-weight:500;flex-shrink:0}
.info-val{font-weight:600;color:#111;text-align:right}
.tracking-card{background:#111;color:#fff;border-radius:12px;padding:18px 20px;margin-bottom:16px;display:flex;align-items:center;gap:12px}
.tracking-card svg{flex-shrink:0}
.tracking-card .tk-row{display:flex;align-items:center;gap:8px;margin-bottom:4px}
.tracking-card .tk-row:last-child{margin-bottom:0}
.tracking-card .tk-label{font-size:12px;color:#999;min-width:60px}
.tracking-card .tk-val{font-size:15px;font-weight:700}

.btn-back{display:block;text-align:center;margin-top:20px;padding:12px;background:#f5f5f5;border-radius:10px;text-decoration:none;font-size:14px;font-weight:600;color:#555}
.btn-back:hover{background:#eee}
