/* 訂單追蹤頁（我的訂單 / 訂單詳情 / 訂單查詢）共用樣式 */

.orders-page {
    max-width: 920px;
    margin: 0 auto;
    padding: 100px 16px 80px;
    color: #e0e0e0;
}

.orders-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.orders-page-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.orders-page-title i { color: #f39c12; }

.orders-back-link,
.orders-link {
    color: #f39c12;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color .15s;
}
.orders-back-link:hover,
.orders-link:hover { color: #f0a830; }

/* ── 卡片 ── */
.order-card {
    background: rgba(20, 20, 35, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px 22px;
    margin-bottom: 18px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.order-card-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ecf0f1;
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.order-card-section-title i { color: #f39c12; }

/* ── 狀態徽章 ── */
.order-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}

.order-status-note {
    margin: 14px 0 0;
    padding: 12px 16px;
    background: rgba(243, 156, 18, 0.08);
    border-left: 3px solid #f39c12;
    border-radius: 8px;
    font-size: 0.88rem;
    color: #d8d8d8;
    line-height: 1.6;
}

/* ── 物流進度條 ── */
.tracking-timeline {
    display: flex;
    align-items: flex-start;
    margin: 6px 0 4px;
}

.tracking-step {
    flex: 1;
    text-align: center;
    position: relative;
    min-width: 0;
}

.tracking-step-dot {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.15);
    color: #7f8c9a;
    position: relative;
    z-index: 2;
    transition: all .2s;
}

/* 連接線 */
.tracking-step:not(:first-child)::before {
    content: '';
    position: absolute;
    top: 16px;
    left: -50%;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.12);
    z-index: 1;
}

.tracking-step.done .tracking-step-dot {
    background: #2ecc71;
    border-color: #2ecc71;
    color: #fff;
}
.tracking-step.done:not(:first-child)::before { background: #2ecc71; }

.tracking-step.current .tracking-step-dot {
    background: #f39c12;
    border-color: #f39c12;
    color: #fff;
    box-shadow: 0 0 0 4px rgba(243, 156, 18, 0.2);
}
.tracking-step.current:not(:first-child)::before {
    background: linear-gradient(90deg, #2ecc71, #f39c12);
}

.tracking-step-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #95a5a6;
}
.tracking-step.done .tracking-step-label,
.tracking-step.current .tracking-step-label { color: #ecf0f1; }

.tracking-step-time {
    font-size: 0.68rem;
    color: #7f8c9a;
    margin-top: 2px;
}

/* 物流查詢指引 */
.tracking-guide {
    margin-top: 18px;
    padding: 16px 18px;
    background: rgba(46, 204, 113, 0.07);
    border: 1px solid rgba(46, 204, 113, 0.25);
    border-radius: 12px;
}
.tracking-guide-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #2ecc71;
    margin-bottom: 8px;
}
.tracking-guide-text {
    font-size: 0.86rem;
    color: #d8d8d8;
    line-height: 1.7;
    margin: 0 0 12px;
}
.tracking-number-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 8px;
    margin-bottom: 12px;
}
.tracking-number-row .label { color: #95a5a6; font-size: 0.8rem; font-weight: 600; }
.tracking-number-row .value { color: #fff; font-weight: 700; letter-spacing: 0.5px; user-select: all; flex: 1; min-width: 0; word-break: break-all; }
.copy-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ecf0f1;
    font-size: 0.78rem;
    padding: 5px 12px;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
}
.copy-btn:hover { background: rgba(255, 255, 255, 0.18); }
.tracking-query-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    background: #2ecc71;
    color: #0c2a17;
    font-weight: 700;
    font-size: 0.86rem;
    border-radius: 8px;
    text-decoration: none;
    transition: background .15s;
}
.tracking-query-btn:hover { background: #38d97f; color: #0c2a17; text-decoration: none; }

/* ── 資訊列 ── */
.order-info-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 0;
    font-size: 0.88rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.order-info-row:last-child { border-bottom: none; }
.order-info-row .k { color: #95a5a6; flex-shrink: 0; }
.order-info-row .v { color: #ecf0f1; text-align: right; word-break: break-word; }

/* ── 商品明細 ── */
.order-item-line {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.order-item-line:last-child { border-bottom: none; }
.order-item-thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    background-color: rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}
.order-item-info { flex: 1; min-width: 0; }
.order-item-name { font-size: 0.9rem; color: #ecf0f1; font-weight: 600; }
.order-item-variant { font-size: 0.78rem; color: #95a5a6; margin-top: 2px; }
.order-item-qty { font-size: 0.85rem; color: #f39c12; font-weight: 700; flex-shrink: 0; }

/* ── 金額拆解 ── */
.order-amount-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 2px solid rgba(255, 255, 255, 0.12);
    font-size: 1.05rem;
    font-weight: 800;
}
.order-amount-total .v { color: #f39c12; }

/* ── 我的訂單列表 ── */
.order-list-card {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: border-color .15s, transform .12s;
}
.order-list-card:hover {
    border-color: rgba(243, 156, 18, 0.4);
    transform: translateY(-2px);
    color: inherit;
    text-decoration: none;
}
.order-list-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.order-list-no { font-size: 0.92rem; font-weight: 700; color: #fff; }
.order-list-date { font-size: 0.76rem; color: #95a5a6; }
.order-list-summary { font-size: 0.86rem; color: #cfd3d6; margin-bottom: 6px; }
.order-list-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
}
.order-list-total { color: #f39c12; font-weight: 700; }
.order-list-chevron { color: #7f8c9a; font-size: 0.8rem; }

/* ── 空狀態 ── */
.orders-empty {
    text-align: center;
    padding: 70px 20px;
    color: #95a5a6;
}
.orders-empty i { font-size: 3rem; color: rgba(243, 156, 18, 0.5); margin-bottom: 16px; }
.orders-empty p { font-size: 1rem; margin-bottom: 20px; }
.orders-empty-btn {
    display: inline-block;
    padding: 10px 24px;
    background: #f39c12;
    color: #1a1a2e;
    font-weight: 700;
    border-radius: 999px;
    text-decoration: none;
    transition: background .15s;
}
.orders-empty-btn:hover { background: #f0a830; color: #1a1a2e; text-decoration: none; }

/* ── 分頁 ── */
.orders-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin-top: 24px;
    font-size: 0.88rem;
}
.orders-pagination a {
    color: #f39c12;
    text-decoration: none;
    padding: 6px 14px;
    border: 1px solid rgba(243, 156, 18, 0.4);
    border-radius: 8px;
    transition: background .15s;
}
.orders-pagination a:hover { background: rgba(243, 156, 18, 0.1); }
.orders-pagination .current-page { color: #95a5a6; }

/* ── 查詢表單 ── */
.track-form { max-width: 460px; margin: 0 auto; }
.track-form-group { margin-bottom: 16px; }
.track-form-group label {
    display: block;
    font-size: 0.85rem;
    color: #cfd3d6;
    margin-bottom: 6px;
    font-weight: 600;
}
.track-form-group input {
    width: 100%;
    padding: 12px 14px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: #fff;
    font-size: 0.95rem;
}
.track-form-group input:focus {
    outline: none;
    border-color: #f39c12;
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.15);
}
.track-submit-btn {
    width: 100%;
    padding: 13px;
    background: #f39c12;
    color: #1a1a2e;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: background .15s;
}
.track-submit-btn:hover { background: #f0a830; }
.track-error {
    background: rgba(231, 76, 60, 0.1);
    border-left: 3px solid #e74c3c;
    color: #f5b7b1;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 18px;
    font-size: 0.88rem;
}
.track-hint {
    margin-top: 18px;
    font-size: 0.8rem;
    color: #7f8c9a;
    line-height: 1.7;
    text-align: center;
}

@media (max-width: 600px) {
    .orders-page { padding-top: 84px; }
    .tracking-step-label { font-size: 0.72rem; }
    .tracking-step-dot { width: 30px; height: 30px; font-size: 0.8rem; }
    .tracking-step:not(:first-child)::before { top: 14px; }
}
