/* Track order page */

.track-order-page {
    padding-top: 32px;
    padding-bottom: 56px;
}

.track-order-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.track-order-header {
    margin-bottom: 28px;
}

.track-order-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    margin-bottom: 10px;
}

.track-order-lead {
    max-width: 560px;
    margin: 0 auto;
    font-size: 0.95rem;
}

.track-order-search {
    max-width: 680px;
    margin: 0 auto 28px;
}

.track-order-search-row {
    display: flex;
    gap: 0;
    border: 1px solid #ccc;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.track-order-input {
    border: 0;
    border-radius: 0;
    box-shadow: none !important;
    min-height: 48px;
    font-size: 0.95rem;
}

.track-order-submit {
    border-radius: 0;
    min-width: 120px;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    white-space: nowrap;
}

.track-order-alert {
    max-width: 680px;
    margin: 0 auto 24px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.92rem;
}

.track-order-alert-danger {
    color: #842029;
    background: #f8d7da;
    border: 1px solid #f5c2c7;
}

.track-order-card {
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 24px;
    background: #fff;
}

.track-order-results {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.track-order-block {
    margin: 0;
}

.track-order-unified-grid {
    display: flex;
    align-items: stretch;
    gap: 0;
}

.track-order-unified-main {
    flex: 1 1 58%;
    min-width: 0;
}

.track-order-unified-divider {
    flex: 0 0 1px;
    align-self: stretch;
    background: #e5e5e5;
    margin: 0 24px;
}

.track-order-unified-shipping {
    flex: 0 1 38%;
    min-width: 200px;
    display: flex;
    flex-direction: column;
}

.track-order-pagination {
    margin-top: 28px;
}

.track-order-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.track-order-sn {
    font-size: 0.8rem;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.track-order-sn-value {
    font-size: 1.05rem;
    font-weight: 600;
    word-break: break-all;
}

.track-order-status {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
}

.track-order-status-success {
    color: #1f6f3f;
    background: #e8f5ec;
}

.track-order-status-info {
    color: #0b4f7a;
    background: #e7f3fb;
}

.track-order-status-warning {
    color: #8a5a00;
    background: #fff4d6;
}

.track-order-status-muted {
    color: #666;
    background: #f2f2f2;
}

.track-order-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.track-order-meta-label {
    font-size: 0.78rem;
    color: #777;
    margin-bottom: 4px;
}

.track-order-meta-value {
    font-size: 0.95rem;
    color: #222;
    word-break: break-word;
}

.track-order-section-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 14px;
}

.track-order-items {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

.track-order-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.track-order-item-thumb {
    position: relative;
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    background: #fafafa;
}

.track-order-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.track-order-item-qty {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: #333;
    color: #fff;
    font-size: 0.72rem;
    line-height: 22px;
    text-align: center;
}

.track-order-item-body {
    flex: 1;
    min-width: 0;
}

.track-order-item-name {
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.4;
}

.track-order-item-variant {
    margin-top: 4px;
    font-size: 0.82rem;
    color: #777;
}

.track-order-item-price {
    flex-shrink: 0;
    font-size: 0.92rem;
    font-weight: 600;
    white-space: nowrap;
}

.track-order-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 0.92rem;
    color: #444;
}

.track-order-summary-discount {
    color: #059669;
}

.track-order-summary {
    border-top: 1px solid #eee;
    padding-top: 16px;
}

.track-order-promo-line span:last-child {
    white-space: nowrap;
}

.track-order-summary-total {
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    font-size: 1rem;
    font-weight: 700;
    color: #111;
}

.track-order-card-shipping {
    min-height: 280px;
}

.track-order-unified-shipping .track-order-shipping-placeholder {
    flex: 1;
    min-height: 200px;
}

.track-order-shipping-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 200px;
    padding: 24px 16px;
    border: 1px dashed #ddd;
    border-radius: 10px;
    background: #fafafa;
    color: #666;
}

.track-order-shipping-icon {
    font-size: 2rem;
    margin-bottom: 12px;
    color: #999;
}

.track-order-shipping-text {
    max-width: 260px;
    font-size: 0.92rem;
    line-height: 1.5;
}

@media (max-width: 991.98px) {
    .track-order-submit {
        min-width: 96px;
    }

    .track-order-unified-grid {
        flex-direction: column;
    }

    .track-order-unified-divider {
        width: 100%;
        height: 1px;
        margin: 20px 0;
        flex: 0 0 auto;
    }

    .track-order-unified-shipping {
        min-width: 0;
    }
}

@media (max-width: 575.98px) {
    .track-order-search-row {
        flex-direction: column;
        border: 0;
        gap: 10px;
        overflow: visible;
        background: transparent;
    }

    .track-order-input,
    .track-order-submit {
        border-radius: 8px;
        border: 1px solid #ccc;
    }

    .track-order-card {
        padding: 18px;
    }
}
