.track_order_grid {
    max-width: 920px;
    margin: 0 auto;
    width: 100%;
    display: block;
    text-align: left;
}

/* top order card */
.order-top-card .ub-h4 {
    font-size: 1.25rem;
}

/* status banner */
.status-banner {
    background: linear-gradient(90deg, #eef6ff, #f8fbff);
    border: 1px solid rgba(20, 115, 230, 0.08);
    padding: 16px;
    align-items: center;
}

.status-banner a.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.12);
    color: #0b5ed7;
    background: transparent;
}

/* shipment card */
.shipment-card {
    gap: 20px;
}

.deliver-to-card {
    background: #f8f9fb;
    border-radius: 8px;
    width: 220px;
}

/* progress steps */
.progress-steps {
    display: flex;
    gap: 8px;
    align-items: center;
}

.progress-steps .step {
    flex: 1;
    background: #f1f3f5;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    text-align: center;
    color: #6c757d;
    border: 1px solid transparent;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* completed: stage already passed */
.progress-steps .step.completed {
    background: var(--primary);
    color: #ffffff;
    font-weight: 700;
    box-shadow: inset 0 -3px 0 rgba(15, 81, 50, 0.06);
    border: 1px solid transparent;
}

/* current: the stage currently in progress */
.progress-steps .step.current {
    background: linear-gradient(90deg, #dbeafe, #c7e6ff);
    color: #0b5ed7;
    font-weight: 700;
    box-shadow: inset 0 -3px 0 rgba(11, 94, 212, 0.08);
    border: 1px solid transparent;
}

/* cancelled or failed orders */
.progress-steps .step.cancelled {
    background: #fff5f5;
    color: #842029;
    border: 1px solid #f5c2c7;
    font-weight: 600;
}

/* legacy fallback for older .active class */
.progress-steps .step.active {
    background: linear-gradient(90deg, #dbeafe, #c7e6ff);
    color: #0b5ed7;
    font-weight: 600;
    box-shadow: inset 0 -3px 0 rgba(11, 94, 212, 0.08);
    border: 1px solid transparent;
}

/* item card */
.item-card {
    align-items: center;
}

.item-card .item-image img {
    border-radius: 8px;
}

/* small screens adjustments */
@media (max-width: 768px) {
    .track_order_grid {
        padding-left: 12px;
        padding-right: 12px;
    }

    .shipment-card {
        flex-direction: column;
    }

    .deliver-to-card {
        width: 100%;
        text-align: left;
    }

    .status-banner {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start
    }

    .order-top-card {
        text-align: left
    }
}

/* legacy / fallback styles kept for compatibility below */
.order_summary_detail {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
}

/* keep previous table-like items layout for older markup */
.order-items-container {
    width: 100%;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.order-items-header {
    display: flex;
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
}

.order-items-header>div {
    flex: 1;
    font-weight: 600
}

.order-item {
    display: flex;
    align-items: center;
    background-color: #ffffff
}

.order-item>div {
    flex: 1
}

.product-info {
    display: flex;
    flex-direction: column
}

.product-variation {
    color: #6c757d;
    margin-top: 4px
}